net/http: unable to post body to an HTTP/2 server. #17066
Comments
Run your program with |
Here's the result:
|
Yeah, this was nginx being overly aggressive in its interpretation of the spec. The link you found has the history: curl/curl#804 I think we'll do nothing here, like curl. I'd reluctant to block waiting for their settings. Maybe we could block up to 100ms or something? I don't know. I guess it depends how long this nginx bug will be in the wild. If we wanted to go all the way, we could retry on REFUSED_STREAM if we hadn't written DATA yet, or buffer, but that seems like a lot of work if it's a temporary fix only. |
Thank you for the info. I also sent a message out to @pipedrive to (hopefully) upgrade nginx. |
Ah @bradfitz you beat me to the punch, I was just reproducing this firstly to ensure that our plain net/http 2 servers can receive the request then was gonna reproduce with nginx. Code at https://github.com/odeke-em/bugs/tree/master/golang/17066 |
Just to confirm, it looks like it is't possible to make requests using http 1 wil ssl. It looks like http.Transport dictates this. Is there another way to force http 1? |
See the package docs: https://golang.org/pkg/net/http/#pkg-overview I'm going to close this for now. We can reopen if it looks like that nginx is going to be in the wild for some time. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.7.1 darwin/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
Run the following code locally.
What did you expect to see?
A response without an error
What did you see instead?
I get the following error
Oddly when I pass a
nil
body into the request, I get a response from the server stating that my email and password is required:Their server is nginx 1.9.15 and there are some places that indicate there's an issue with this particular version of nginx; However, I'd like to confirm with the folks here.
/cc @pipedrive
The text was updated successfully, but these errors were encountered: