-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
FrozenDueToAgeSuggestedIssues that may be good for new contributors looking for work to do.Issues that may be good for new contributors looking for work to do.
Milestone
Description
The http Client should probably support Expect: 100-continue. The server does. It does introduce a new round-trip, though, so we should probably only send it when the data size exceeds some threshold. Probably the same threshold we use for consuming request bodies when a handler doesn't (maxPostHandlerReadBytes). I think we could see if we know the size of the request body (just as NewRequest does, checking for a few known types), but if the Body is non-nil and the ContentLength is <=0 (unknown), we instead slurp up the Body into a bytes.Buffer to see if it's >= someThreshold. If so, we replace the Body with a io.MultiReader(slurped, rest) and proceed to do a 100-continue. If not, we blast it away HTTP/1.0-style.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeSuggestedIssues that may be good for new contributors looking for work to do.Issues that may be good for new contributors looking for work to do.