Descriptionnet/http: ignore 100-continue responses in Transport
"There are only two hard problems in computer science:
cache invalidation, naming things, and off-by-one errors."
The HTTP server code already strips Expect: 100-continue on
requests, so httputil.ReverseProxy should be unaffected, but
some servers send unsolicited HTTP/1.1 100 Continue responses,
so we need to skip over them if they're seen to avoid getting
off-by-one on Transport requests/responses.
This does change the behavior of people who were using Client
or Transport directly and explicitly setting "Expect: 100-continue"
themselves, but it didn't work before anyway. Now instead of the
user code seeing a 100 response and then things blowing up, now
it basically works, except the Transport will still blast away
the full request body immediately. That's the part that needs
to be finished to close this issue.
This is the safe quick fix.
Update Issue 3665
Patch Set 1 #Patch Set 2 : diff -r 192e257c6507 https://go.googlecode.com/hg/ #Patch Set 3 : diff -r 192e257c6507 https://go.googlecode.com/hg/ #
Total comments: 2
Patch Set 4 : diff -r f248b961193a https://go.googlecode.com/hg/ #
MessagesTotal messages: 9
|