Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Port number incorrectly shared between requests when using HTTP Proxy with connection re-use #1887
I did this
I expected the following
What actually happened
When re-using a connection with an HTTP Proxy, curl will re-use the port number in the
Full anonymised log: We use an internal proxy server, we did not share the proxy server that we used nor the destination endpoints of the example. Let me know if this is a hurdle:
I've verified that the latest version of curl master is also affected (7.56.0-DEV).
I've proposed a workaround here, though this is not ideal we would like to re-use proxy connections while specifying a different port.
Disabling connection re-use is a workaround for this issue.
referenced this issue
Sep 13, 2017
I added some logs in. Looks like there's something squiffy going on in the connection reuse code.
The port parsing in the second case is done on some random new connection, but then the old connection is used when building the Host header.