Mercurial > hg > nginx
comparison src/http/v2/ngx_http_v2_filter_module.c @ 7537:01e26357916a
HTTP/2: return error on output on closed stream.
Without this, an (incorrect) output on a closed stream could result in
a socket leak.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 18 Jul 2019 18:27:50 +0300 |
parents | 8e6bb4e6045f |
children | 99257b06b0bd |
comparison
equal
deleted
inserted
replaced
7536:c3f60d618c17 | 7537:01e26357916a |
---|---|
1442 in = in->next; | 1442 in = in->next; |
1443 } | 1443 } |
1444 | 1444 |
1445 if (in == NULL || stream->out_closed) { | 1445 if (in == NULL || stream->out_closed) { |
1446 | 1446 |
1447 if (size) { | |
1448 ngx_log_error(NGX_LOG_ERR, fc->log, 0, | |
1449 "output on closed stream"); | |
1450 return NGX_CHAIN_ERROR; | |
1451 } | |
1452 | |
1447 if (stream->queued) { | 1453 if (stream->queued) { |
1448 fc->write->active = 1; | 1454 fc->write->active = 1; |
1449 fc->write->ready = 0; | 1455 fc->write->ready = 0; |
1450 | 1456 |
1451 } else { | 1457 } else { |