Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add a regression test for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly I don't have much time for this right now. Also I don't know all the details on how the interaction with openssl works exactly, and in what situations this code is called (all I know is that it's used when talking to proxies, but I'm sure there's more to it).
I will keep this in the back of my head and try to come up with some tests in a quiet minute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, we've seen the same bug in Debian (in connection with an https_proxy), and the above change fixes it both for the reporter in his real enviroment and for me while testing.
That's https://bugs.debian.org/1061660 (a bit long-winded as it took me some time to figure out what the problem or the difference in my environment was -- the proxy).
While I don't claim to understand what's going on here on a deeper level and therefore can't offer any assistance in coming up with tests, I can at least confirm both the problem and that this proposed changes makes it better :)