mirror of
https://github.com/nginx/nginx.git
synced 2026-08-04 14:58:20 +00:00
HTTP/2: return error on output on closed stream.
Without this, an (incorrect) output on a closed stream could result in a socket leak.
This commit is contained in:
parent
551640703a
commit
36dfa020f2
1 changed files with 6 additions and 0 deletions
|
|
@ -1444,6 +1444,12 @@ ngx_http_v2_send_chain(ngx_connection_t *fc, ngx_chain_t *in, off_t limit)
|
|||
|
||||
if (in == NULL || stream->out_closed) {
|
||||
|
||||
if (size) {
|
||||
ngx_log_error(NGX_LOG_ERR, fc->log, 0,
|
||||
"output on closed stream");
|
||||
return NGX_CHAIN_ERROR;
|
||||
}
|
||||
|
||||
if (stream->queued) {
|
||||
fc->write->active = 1;
|
||||
fc->write->ready = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue