mirror of
https://github.com/nginx/nginx.git
synced 2024-12-16 06:09:00 +08:00
5429140c01
Previously, the stream's window was kept zero in order to prevent a client from sending the request body before it was requested (see 887cca40ba6a for details). Until such initial window was acknowledged all requests with data were rejected (see 0aa07850922f for details). That approach revealed a number of problems: 1. Some clients (notably MS IE/Edge, Safari, iOS applications) show an error or even crash if a stream is rejected; 2. This requires at least one RTT for every request with body before the client receives window update and able to send data. To overcome these problems the new directive "http2_body_preread_size" is introduced. It sets the initial window and configures a special per stream preread buffer that is used to save all incoming data before the body is requested and processed. If the directive's value is lower than the default initial window (65535), as previously, all streams with data will be rejected until the new window is acknowledged. Otherwise, no special processing is used and all requests with data are welcome right from the connection start. The default value is chosen to be 64k, which is bigger than the default initial window. Setting it to zero is fully complaint to the previous behavior. |
||
---|---|---|
.. | ||
modules | ||
v2 | ||
ngx_http_cache.h | ||
ngx_http_config.h | ||
ngx_http_copy_filter_module.c | ||
ngx_http_core_module.c | ||
ngx_http_core_module.h | ||
ngx_http_file_cache.c | ||
ngx_http_header_filter_module.c | ||
ngx_http_parse.c | ||
ngx_http_postpone_filter_module.c | ||
ngx_http_request_body.c | ||
ngx_http_request.c | ||
ngx_http_request.h | ||
ngx_http_script.c | ||
ngx_http_script.h | ||
ngx_http_special_response.c | ||
ngx_http_upstream_round_robin.c | ||
ngx_http_upstream_round_robin.h | ||
ngx_http_upstream.c | ||
ngx_http_upstream.h | ||
ngx_http_variables.c | ||
ngx_http_variables.h | ||
ngx_http_write_filter_module.c | ||
ngx_http.c | ||
ngx_http.h |