-
Notifications
You must be signed in to change notification settings - Fork 796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S3 + HTTP/2: "duplicate" header #6352
Comments
Maybe related to seanmonstar/reqwest#1809 |
There was a PR to automatically remove the host header on a library level, but it was rejected because it is legal to send both the The spec just says they may not differ. However, it is unnecessary for a client to send both headers. It looks the request signature needs to include the So this function needs to know ahead of time whether the connection is HTTP/1.1 or HTTP/2, because what it's signing will be different. It can't be taken care of by the HTTP library. |
So I would summarize this like this:
We COULD make
So if a HTTP/2 proxy has a HTTP/1.1 upstream does it not convert the pseudo header ( |
Hi, I submitted this issue to |
Describe the bug
The bug occurs when S3 signatures are used in combination with HTTP/2. This (IIRC) is currently not possible with AWS S3, but some other vendors or custom implementation may run into this.
The combination produces the special
:authority:
HTTP/2 pseudo-header as well as theHost
header. Some server or middleware implementation don't like that, e.g. Nginx will return a "bad request" and emit the log (here the host waslocalhost:9999
:Note that the header is not really duplicate. It's likely that Nginx internally renames
:authority
toHost
and then trips over it. Also see https://trac.nginx.org/nginx/ticket/2268 .To Reproduce
Expected behavior
Additional context
I think the culprit is this bit here:
arrow-rs/object_store/src/aws/credential.rs
Lines 157 to 159 in 97ae9d7
Of course one could argue that
reqwest
orh2
should de-duplicate the headers properly.The text was updated successfully, but these errors were encountered: