http2: Curl_expire() all handles with incoming traffic
... so that they'll get handled next in the multi loop.
This commit is contained in:
parent
56c362b1a7
commit
61a94d6f77
@ -287,6 +287,7 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
|
|||||||
stream->memlen += ncopy;
|
stream->memlen += ncopy;
|
||||||
|
|
||||||
data_s->state.drain++;
|
data_s->state.drain++;
|
||||||
|
Curl_expire(data_s, 1);
|
||||||
break;
|
break;
|
||||||
case NGHTTP2_PUSH_PROMISE:
|
case NGHTTP2_PUSH_PROMISE:
|
||||||
DEBUGF(infof(data_s, "Got PUSH_PROMISE, RST_STREAM it!\n"));
|
DEBUGF(infof(data_s, "Got PUSH_PROMISE, RST_STREAM it!\n"));
|
||||||
@ -375,8 +376,8 @@ static int on_data_chunk_recv(nghttp2_session *session, uint8_t flags,
|
|||||||
stream->memlen += nread;
|
stream->memlen += nread;
|
||||||
|
|
||||||
data_s->state.drain++;
|
data_s->state.drain++;
|
||||||
/* TODO: this may need to set expire for the multi_socket to work for this
|
Curl_expire(data_s, 1); /* TODO: fix so that this can be set to 0 for
|
||||||
stream */
|
immediately? */
|
||||||
|
|
||||||
DEBUGF(infof(data_s, "%zu data received for stream %x "
|
DEBUGF(infof(data_s, "%zu data received for stream %x "
|
||||||
"(%zu left in buffer %p, total %zu)\n",
|
"(%zu left in buffer %p, total %zu)\n",
|
||||||
@ -578,6 +579,7 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
|
|||||||
Curl_add_buffer(stream->header_recvbuf, value, valuelen);
|
Curl_add_buffer(stream->header_recvbuf, value, valuelen);
|
||||||
Curl_add_buffer(stream->header_recvbuf, "\r\n", 2);
|
Curl_add_buffer(stream->header_recvbuf, "\r\n", 2);
|
||||||
data_s->state.drain++;
|
data_s->state.drain++;
|
||||||
|
Curl_expire(data_s, 1);
|
||||||
|
|
||||||
DEBUGF(infof(data_s, "h2 status: HTTP/2 %03d\n",
|
DEBUGF(infof(data_s, "h2 status: HTTP/2 %03d\n",
|
||||||
stream->status_code));
|
stream->status_code));
|
||||||
@ -603,6 +605,7 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
|
|||||||
Curl_add_buffer(stream->header_recvbuf, value, valuelen);
|
Curl_add_buffer(stream->header_recvbuf, value, valuelen);
|
||||||
Curl_add_buffer(stream->header_recvbuf, "\r\n", 2);
|
Curl_add_buffer(stream->header_recvbuf, "\r\n", 2);
|
||||||
data_s->state.drain++;
|
data_s->state.drain++;
|
||||||
|
Curl_expire(data_s, 1);
|
||||||
|
|
||||||
DEBUGF(infof(data_s, "h2 header: %.*s: %.*s\n",
|
DEBUGF(infof(data_s, "h2 header: %.*s: %.*s\n",
|
||||||
namelen, name, valuelen, value));
|
namelen, name, valuelen, value));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user