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
header field "host" includes port 80 #2894
Comments
Recently, most clients (including curl & wget) and browsers have started to drop the Examples of other projects stripping the port suffix —
Related We discovered this was an issue while working with HAProxy, when backends use host-based routing. When the @mikeal |
…wn. (#2904) * Strip port suffix from Host header if the protocol is known. This partially revert ff6d6c6, and still works for IPv6 addresses as well. * Port is a string out of url.parse(). See https://nodejs.org/api/url.html#url_url_port * Port is a string out of url.parse(). See https://nodejs.org/api/url.html#url_url_port * Add tests for the new Host header changes.
@zhaotian2470 This can be closed now, as v2.88.1 fixes this. |
As the following code:
request/request.js
Line 294 in bbb3a0b
If URI is "http://myhost:80/path", header field "host" will be set as "myhost:80".
Is it correct?
Note: before commit ff6d6c6, "host" header field will be set as "myhost"
The text was updated successfully, but these errors were encountered: