Closed JesseStimpson closed 1 year ago
Yes they're wrong as far as the spec goes, though I'm sure they have their reasons. This came up before I believe (though not necessarily with this proxy) and the conclusion was that it would be OK to accept HTTP/1.0 but that it would have to be disabled by default and enabled through an option. Best place I believe is in the http_opts
of the original connection, something like allow_http10_connect
or a better name.
Right I think I remember that it's historical, initially it was done over HTTP/1.0 long ago and then it was standardized in HTTP/1.1. New proxies should definitely not use HTTP/1.0 though.
Fixed, thanks!
Hello,
I'm attempting to connect to an HTTP proxy that is running goproxy (the project is from Stripe, but I am not affiliated with them) and encountering a failure in HTTP version incompatibility. Here is my client code
This results in the following error
The function
gun_http:handle_connect/8
is expecting'HTTP/1.1'
, but my proxy is returningHTTP/1.0
, leading to the crash.For reference, here's a link to where goproxy is specifying 1.0 .
I'm not familiar enough with the HTTP spec to know if goproxy is serving the wrong version or not, but if I change
gun_http:handle_connect/8
to allow'HTTP/1.0'
, my request works as expected, so I wanted to check in here.I can submit a PR if you'd like.
Thanks!