HTTP2: Support expect: 100-continue

"Expect: 100-continue", which was once deprecated in HTTP/2, is now
resurrected in HTTP/2 draft 14.  This change adds its support to
HTTP/2 code.  This change also includes stricter header field
checking.
This commit is contained in:
Tatsuhiro Tsujikawa 2014-08-01 23:10:10 +09:00 committed by Daniel Stenberg
parent e4f6adb023
commit 595f5f0e43
3 changed files with 147 additions and 16 deletions

View file

@ -1525,10 +1525,6 @@ static CURLcode expect100(struct SessionHandle *data,
const char *ptr;
data->state.expect100header = FALSE; /* default to false unless it is set
to TRUE below */
if(conn->httpversion == 20) {
/* We don't use Expect in HTTP2 */
return CURLE_OK;
}
if(use_http_1_1plus(data, conn)) {
/* if not doing HTTP 1.0 or disabled explicitly, we add a Expect:
100-continue to the headers which actually speeds up post operations