Loading lib/http.h +5 −5 Original line number Diff line number Diff line Loading @@ -155,6 +155,11 @@ struct HTTP { /* for HTTP/2 we store stream-local data here */ int32_t stream_id; /* stream we are interested in */ /* We store non-final and final response headers here, per-stream */ Curl_send_buffer *header_recvbuf; size_t nread_header_recvbuf; /* number of bytes in header_recvbuf fed into upper layer */ }; typedef int (*sending)(void); /* Curl_send */ Loading @@ -173,11 +178,6 @@ struct http_conn { 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. */ size_t nread_header_recvbuf; /* number of bytes in header_recvbuf fed into upper layer */ const uint8_t *data; /* pointer to data chunk, received in on_data_chunk */ size_t datalen; /* the number of bytes left in data */ Loading lib/http2.c +5 −6 Original line number Diff line number Diff line Loading @@ -84,9 +84,6 @@ static CURLcode http2_disconnect(struct connectdata *conn, nghttp2_session_del(c->h2); Curl_safefree(c->header_recvbuf->buffer); Curl_safefree(c->header_recvbuf); Curl_safefree(c->inbuf); DEBUGF(infof(conn->data, "HTTP/2 DISCONNECT done\n")); Loading Loading @@ -249,6 +246,9 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame, c->status_code = -1; /* get the stream from the hash based on Stream ID */ rv = Curl_hash_pick() Curl_add_buffer(c->header_recvbuf, "\r\n", 2); left = c->header_recvbuf->size_used - c->nread_header_recvbuf; Loading Loading @@ -619,8 +619,7 @@ CURLcode Curl_http2_init(struct connectdata *conn) nghttp2_session_callbacks_set_on_header_callback(callbacks, on_header); /* The nghttp2 session is not yet setup, do it */ rc = nghttp2_session_client_new(&conn->proto.httpc.h2, callbacks, conn); rc = nghttp2_session_client_new(&conn->proto.httpc.h2, callbacks, conn); nghttp2_session_callbacks_del(callbacks); Loading Loading
lib/http.h +5 −5 Original line number Diff line number Diff line Loading @@ -155,6 +155,11 @@ struct HTTP { /* for HTTP/2 we store stream-local data here */ int32_t stream_id; /* stream we are interested in */ /* We store non-final and final response headers here, per-stream */ Curl_send_buffer *header_recvbuf; size_t nread_header_recvbuf; /* number of bytes in header_recvbuf fed into upper layer */ }; typedef int (*sending)(void); /* Curl_send */ Loading @@ -173,11 +178,6 @@ struct http_conn { 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. */ size_t nread_header_recvbuf; /* number of bytes in header_recvbuf fed into upper layer */ const uint8_t *data; /* pointer to data chunk, received in on_data_chunk */ size_t datalen; /* the number of bytes left in data */ Loading
lib/http2.c +5 −6 Original line number Diff line number Diff line Loading @@ -84,9 +84,6 @@ static CURLcode http2_disconnect(struct connectdata *conn, nghttp2_session_del(c->h2); Curl_safefree(c->header_recvbuf->buffer); Curl_safefree(c->header_recvbuf); Curl_safefree(c->inbuf); DEBUGF(infof(conn->data, "HTTP/2 DISCONNECT done\n")); Loading Loading @@ -249,6 +246,9 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame, c->status_code = -1; /* get the stream from the hash based on Stream ID */ rv = Curl_hash_pick() Curl_add_buffer(c->header_recvbuf, "\r\n", 2); left = c->header_recvbuf->size_used - c->nread_header_recvbuf; Loading Loading @@ -619,8 +619,7 @@ CURLcode Curl_http2_init(struct connectdata *conn) nghttp2_session_callbacks_set_on_header_callback(callbacks, on_header); /* The nghttp2 session is not yet setup, do it */ rc = nghttp2_session_client_new(&conn->proto.httpc.h2, callbacks, conn); rc = nghttp2_session_client_new(&conn->proto.httpc.h2, callbacks, conn); nghttp2_session_callbacks_del(callbacks); Loading