]> git.kaiwu.me - nginx.git/commit
HTTP/2: made it possible to flush response headers (ticket #1743).
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 2 Feb 2022 22:44:38 +0000 (01:44 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 2 Feb 2022 22:44:38 +0000 (01:44 +0300)
commita52433a04c58821fd95591e474d35995292f1090
treee6aab7e3d18b95394d72b099486542b09068a46f
parent17c24244b454365b2c068081fa0637ec063cf59c
HTTP/2: made it possible to flush response headers (ticket #1743).

Response headers can be buffered in the SSL buffer.  But stream's fake
connection buffered flag did not reflect this, so any attempts to flush
the buffer without sending additional data were stopped by the write filter.

It does not seem to be possible to reflect this in fc->buffered though, as
we never known if main connection's c->buffered corresponds to the particular
stream or not.  As such, fc->buffered might prevent request finalization
due to sending data on some other stream.

Fix is to implement handling of flush buffers when the c->need_flush_buf
flag is set, similarly to the existing last buffer handling.  The same
flag is now used for UDP sockets in the stream module instead of explicit
checking of c->type.
src/core/ngx_connection.h
src/event/ngx_event_connect.c
src/event/ngx_event_udp.c
src/http/ngx_http_write_filter_module.c
src/http/v2/ngx_http_v2_filter_module.c
src/stream/ngx_stream_write_filter_module.c