swift/test/unit
Tim Burke f6ac7d4491 Tolerate absolute-form request targets
We've seen S3 clients expecting to be able to send request lines like

    GET https://cluster.domain/bucket/key HTTP/1.1

instead of the expected

    GET /bucket/key HTTP/1.1

Testing against other, independent servers with something like

    ( echo -n $'GET https://www.google.com/ HTTP/1.1\r\nHost: www.google.com\r\nConnection: close\r\n\r\n' ; sleep 1 ) | openssl s_client -connect www.google.com:443

suggests that it may be reasonable to accept them; the RFC even goes so
far as to say

> To allow for transition to the absolute-form for all requests in some
> future version of HTTP, a server MUST accept the absolute-form in
> requests, even though HTTP/1.1 clients will only send them in
> requests to proxies.

(See https://datatracker.ietf.org/doc/html/rfc7230#section-5.3.2)

Fix it at the protocol level, so everywhere else we can mostly continue
to assume that PATH_INFO starts with a / like we always have.

Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>
Change-Id: I04012e523f01e910f41d5a41cdd86d3d2a1b9c59
2023-01-03 12:49:30 -08:00
..
account trivial: fix flakey account/test_auditor.py assertion 2022-11-30 11:00:13 +00:00
cli Merge "sharder: update own_sr stats explicitly" 2022-12-09 22:13:44 +00:00
common Tolerate absolute-form request targets 2023-01-03 12:49:30 -08:00
container sharder: update own_sr stats explicitly 2022-12-01 14:23:37 +00:00
obj Clean up some replication error messages 2022-10-23 15:24:23 -07:00
proxy Tolerate absolute-form request targets 2023-01-03 12:49:30 -08:00
test_locale py3: port the test of locale 2019-06-19 09:54:14 -07:00
__init__.py Sharder: Fall back to local device in get_shard_broker 2022-07-29 15:02:26 +01:00
helpers.py Extract SwiftHttpProtocol to its own module 2022-12-06 11:15:53 -08:00