summaryrefslogtreecommitdiff
path: root/lib/http2.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/http2.c')
-rw-r--r--lib/http2.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/http2.c b/lib/http2.c
index aef16370e..c2a45cded 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -269,7 +269,7 @@ static unsigned int http2_conncheck(struct connectdata *check,
return ret_val;
}
-/* called from Curl_http_setup_conn */
+/* called from http_setup_conn */
void Curl_http2_setup_req(struct Curl_easy *data)
{
struct HTTP *http = data->req.protop;
@@ -286,7 +286,7 @@ void Curl_http2_setup_req(struct Curl_easy *data)
http->memlen = 0;
}
-/* called from Curl_http_setup_conn */
+/* called from http_setup_conn */
void Curl_http2_setup_conn(struct connectdata *conn)
{
conn->proto.httpc.settings.max_concurrent_streams =
@@ -1758,11 +1758,10 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
return retlen;
}
- /* If stream is closed, return 0 to signal the http routine to close
+ /* If this stream is closed, return 0 to signal the http routine to close
the connection */
- if(stream->closed) {
- return http2_handle_stream_close(conn, data, stream, err);
- }
+ if(stream->closed)
+ return 0;
*err = CURLE_AGAIN;
H2BUGF(infof(data, "http2_recv returns AGAIN for stream %u\n",
stream->stream_id));
@@ -1881,7 +1880,11 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex,
are going to send or sending request body in DATA frame */
stream->upload_mem = mem;
stream->upload_len = len;
- nghttp2_session_resume_data(h2, stream->stream_id);
+ rv = nghttp2_session_resume_data(h2, stream->stream_id);
+ if(nghttp2_is_fatal(rv)) {
+ *err = CURLE_SEND_ERROR;
+ return -1;
+ }
rv = h2_session_send(conn->data, h2);
if(nghttp2_is_fatal(rv)) {
*err = CURLE_SEND_ERROR;
@@ -2415,8 +2418,6 @@ bool Curl_h2_http_1_1_error(struct connectdata *conn)
#else /* !USE_NGHTTP2 */
/* Satisfy external references even if http2 is not compiled in. */
-
-#define CURL_DISABLE_TYPECHECK
#include <gnurl/curl.h>
char *curl_pushheader_bynum(struct curl_pushheaders *h, size_t num)