summaryrefslogtreecommitdiff
path: root/lib/http2.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2014-11-13 02:07:24 +0900
committerDaniel Stenberg <daniel@haxx.se>2014-11-13 15:38:12 +0100
commit7b7f0da4a7397c918308bf9acb831d4a1d1a9583 (patch)
treeda99d5909e82ec1238ddc21e5cb749434ef362da /lib/http2.h
parent676d62fa0ede12e8f66688675d9db3bb7103cd55 (diff)
downloadcurl-7b7f0da4a7397c918308bf9acb831d4a1d1a9583.tar.gz
http2: Deal with HTTP/2 data inside response header buffer
Previously if HTTP/2 traffic is appended to HTTP Upgrade response header (thus they are in the same buffer), the trailing HTTP/2 traffic is not processed and lost. The appended data is most likely SETTINGS frame. If it is lost, nghttp2 library complains server does not obey the HTTP/2 protocol and issues GOAWAY frame and curl eventually drops connection. This commit fixes this problem and now trailing data is processed.
Diffstat (limited to 'lib/http2.h')
-rw-r--r--lib/http2.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/http2.h b/lib/http2.h
index 66aa6fd5c..5218957f5 100644
--- a/lib/http2.h
+++ b/lib/http2.h
@@ -37,7 +37,8 @@ CURLcode Curl_http2_send_request(struct connectdata *conn);
CURLcode Curl_http2_request_upgrade(Curl_send_buffer *req,
struct connectdata *conn);
CURLcode Curl_http2_setup(struct connectdata *conn);
-CURLcode Curl_http2_switched(struct connectdata *conn);
+CURLcode Curl_http2_switched(struct connectdata *conn,
+ const char *data, size_t nread);
#else /* USE_NGHTTP2 */
#define Curl_http2_init(x) CURLE_UNSUPPORTED_PROTOCOL
#define Curl_http2_send_request(x) CURLE_UNSUPPORTED_PROTOCOL