mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
HTTP/2: simplified checking the END_STREAM flag.
No functional changes.
This commit is contained in:
parent
d418b92cdc
commit
f36f51725a
@ -870,6 +870,8 @@ ngx_http_v2_state_data(ngx_http_v2_connection_t *h2c, u_char *pos, u_char *end)
|
|||||||
return ngx_http_v2_state_skip_padded(h2c, pos, end);
|
return ngx_http_v2_state_skip_padded(h2c, pos, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stream->in_closed = h2c->state.flags & NGX_HTTP_V2_END_STREAM_FLAG;
|
||||||
|
|
||||||
h2c->state.stream = stream;
|
h2c->state.stream = stream;
|
||||||
|
|
||||||
return ngx_http_v2_state_read_data(h2c, pos, end);
|
return ngx_http_v2_state_read_data(h2c, pos, end);
|
||||||
@ -897,8 +899,6 @@ ngx_http_v2_state_read_data(ngx_http_v2_connection_t *h2c, u_char *pos,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (stream->skip_data) {
|
if (stream->skip_data) {
|
||||||
stream->in_closed = h2c->state.flags & NGX_HTTP_V2_END_STREAM_FLAG;
|
|
||||||
|
|
||||||
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
|
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
|
||||||
"skipping http2 DATA frame, reason: %d",
|
"skipping http2 DATA frame, reason: %d",
|
||||||
stream->skip_data);
|
stream->skip_data);
|
||||||
@ -988,9 +988,7 @@ ngx_http_v2_state_read_data(ngx_http_v2_connection_t *h2c, u_char *pos,
|
|||||||
ngx_http_v2_state_read_data);
|
ngx_http_v2_state_read_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (h2c->state.flags & NGX_HTTP_V2_END_STREAM_FLAG) {
|
if (stream->in_closed) {
|
||||||
stream->in_closed = 1;
|
|
||||||
|
|
||||||
if (r->headers_in.content_length_n < 0) {
|
if (r->headers_in.content_length_n < 0) {
|
||||||
r->headers_in.content_length_n = rb->rest;
|
r->headers_in.content_length_n = rb->rest;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user