mirror of
https://github.com/curl/curl.git
synced 2026-08-26 04:13:31 +03:00
http2: Return error if stream was closed with other than NO_ERROR
Previously, we just ignored error code passed to on_stream_close_callback and just return 0 (success) after stream closure even if stream was reset with error. This patch records error code in on_stream_close_callback, and return -1 and use CURLE_HTTP2 error code on abnormal stream closure.
This commit is contained in:
parent
c715fa0b60
commit
48b5374e65
2 changed files with 11 additions and 1 deletions
|
|
@ -7,7 +7,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
|
@ -169,6 +169,7 @@ struct http_conn {
|
|||
sending send_underlying; /* underlying send Curl_send callback */
|
||||
recving recv_underlying; /* underlying recv Curl_recv callback */
|
||||
bool closed; /* TRUE on HTTP2 stream close */
|
||||
uint32_t error_code; /* HTTP/2 error code */
|
||||
Curl_send_buffer *header_recvbuf; /* store response headers. We
|
||||
store non-final and final
|
||||
response headers into it. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue