-
Notifications
You must be signed in to change notification settings - Fork 647
Description
Describe the bug
middleware-host-header sends an empty :authority header in the request on http2:
| request.headers[":authority"] = ""; |
This is invalid as per RFC3986 and RFC7230 and well-behaving servers must reject such requests. See https://trac.nginx.org/nginx/ticket/1551 for details.
SDK version number
@aws-sdk/middleware-host-header@1.0.0-gamma.6
Is the issue in the browser/Node.js/ReactNative?
Tested on node, perhaps present elsewhere.
Details of the browser/Node.js/ReactNative version
λ node -v
v13.9.0
To Reproduce (observed behavior)
The context is that I am playing around with an http/2 nginx proxy to S3 with the client configured to use NodeHttp2Handler so that clients on the WAN sending extremely large numbers of small S3 GETs may be served more performantly:
new S3({
requestHandler: new NodeHttp2Handler(),
});I understand that's a niche and perhaps nonsensical usecase, but I think this ought to be reproducible with anything that can be configured to use NodeHttp2Handler.
Expected behavior
middleware-host-header should send well-formed HTTP/2 requests.