Closed connection not reported as error in cleartext HTTP2 upgrade #166

bdarnell opened this Issue Mar 14, 2015 · 2 comments


None yet

2 participants


I'm using the multi interface to fetch an HTTP url with CURLOPT_HTTP_VERSION set to CURL_HTTP_VERSION_2 (so HTTP2 is not actually in use; it's an HTTP1 request with an upgrade header). If the server closes the socket without sending a response, this is not reported as an error (curl_multi_info_read returns a result of CURLE_OK). Without setting CURLOPT_HTTP_VERSION it correctly reports CURLE_PARTIAL_FILE.

Versions: libcurl 7.41.0 and nghttp2 0.7.5 on OSX

@bagder bagder self-assigned this Mar 14, 2015
@bagder bagder added the HTTP label Mar 14, 2015
bagder commented Mar 14, 2015

Thanks, I can repeat it too...

@bagder bagder added a commit that referenced this issue Mar 14, 2015
@bagder bagder http2: detect prematures close without data transfered
... by using the regular Curl_http_done() method which checks for
that. This makes test 1801 fail consistently with error 56 (which seems
fine) to that test is also updated here.

Reported-by: Ben Darnell
Bug: #166
bagder commented Mar 14, 2015

Fixed now in commit 0cf649d. Thanks a lot, case closed!

@bagder bagder closed this Mar 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment