Skip to content

Conversation

Thannoy
Copy link

@Thannoy Thannoy commented Aug 18, 2023

Useful "Host" HTTP header comes from HTTP/1.1. Using it in a HTTP/1.0 context is not valid on the paper, despite it works well for both default URLs (official and fallback github mirror). I think using HTTP/1.1 instead is saner and more likely to succeed on custom URLs.

This requires to explicitly reject keep-alive connections (default behavior starting from HTTP/1.1) , otherwise read call timeouts waiting the end of stream. Since the result HTTP request is a bit long, I made it multi-line.

Useful "Host" HTTP header comes from HTTP/1.1.
Using it in a HTTP/1.0 context is not valid,
despite it works well for both default URLs.

Also disable HTTP/1.1 default keep-alive,
otherwise read call dies in timeout.

Signed-off-by: Anthony Loiseau <[email protected]>
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

Successfully merging this pull request may close these issues.

1 participant