Skip to content

Commit

Permalink
http2: Don't increment drain when one header field is received
Browse files Browse the repository at this point in the history
Sicne we write header field in temporary location, not in the memory
that upper layer provides, incrementing drain should not happen.

Ref: curl#659
Ref: curl#663
  • Loading branch information
tatsuhiro-t authored and jay committed Apr 10, 2016
1 parent 90abbc4 commit fb7a01a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/http2.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,8 +848,6 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
Curl_add_buffer(stream->header_recvbuf, value, valuelen);
/* the space character after the status code is mandatory */
Curl_add_buffer(stream->header_recvbuf, " \r\n", 3);
data_s->state.drain++;
conn->proto.httpc.drain_total++;
/* if we receive data for another handle, wake that up */
if(conn->data != data_s)
Curl_expire(data_s, 1);
Expand All @@ -866,8 +864,6 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
Curl_add_buffer(stream->header_recvbuf, ":", 1);
Curl_add_buffer(stream->header_recvbuf, value, valuelen);
Curl_add_buffer(stream->header_recvbuf, "\r\n", 2);
data_s->state.drain++;
conn->proto.httpc.drain_total++;
/* if we receive data for another handle, wake that up */
if(conn->data != data_s)
Curl_expire(data_s, 1);
Expand Down

0 comments on commit fb7a01a

Please sign in to comment.