]> granicus.if.org Git - curl/commit
Fix bug that HTTP/2 hangs if whole response body is read with headers
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
Wed, 26 Feb 2014 16:21:17 +0000 (01:21 +0900)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 28 Feb 2014 22:28:39 +0000 (23:28 +0100)
commitcde0cf7c5ede69c68cb00cba3d1a6ccc27c24bc9
tree1072828797a999c8d68a4e70ec65a9ec9d629bcf
parent53f1f4a18ee7e3ac5fbe44a0e16b33b27465432b
Fix bug that HTTP/2 hangs if whole response body is read with headers

For HTTP/2, we may read up everything including responde body with
header fields in Curl_http_readwrite_headers. If no content-length is
provided, curl waits for the connection close, which we emulate it
using conn->proto.httpc.closed = TRUE. The thing is if we read
everything, then http2_recv won't be called and we cannot signal the
HTTP/2 stream has closed. As a workaround, we return nonzero from
data_pending to call http2_recv.
lib/http2.c
lib/transfer.c