Skip to content
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

Please append port number to HOST header #18

Closed
toge opened this issue Nov 1, 2017 · 1 comment
Closed

Please append port number to HOST header #18

toge opened this issue Nov 1, 2017 · 1 comment

Comments

@toge
Copy link

toge commented Nov 1, 2017

In RFC 7230(HTTP1.1),

if the connection's incoming TCP port number
differs from the default port for the effective request URI's
scheme, then a colon (":") and the incoming port number (in
decimal form) are appended to the authority component.

While I know your library supports HTTP/1.0,
I'm glad to append port number to HOST header like following:

#-    req.set_header("Host", host_.c_str());
+    req.set_header("Host", (host_ + ":" + std::to_string(port_)).c_str());

@yhirose yhirose closed this as completed in bd089e9 Nov 6, 2017
@yhirose
Copy link
Owner

yhirose commented Nov 6, 2017

@toge, thanks for the good suggestion. I have implemented it at bd089e9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants