comparison src/http/v2/ngx_http_v2.h @ 6496:887cca40ba6a

HTTP/2: rewritten handling of request body. There are two improvements: 1. Support for request body filters; 2. Receiving of request body is started only after the ngx_http_read_client_request_body() call. The last one fixes the problem when the client_max_body_size value might not be respected from the right location if the location was changed either during the process of receiving body or after the whole body had been received.
author Valentin Bartenev <vbart@nginx.com>
date Fri, 01 Apr 2016 15:56:03 +0300
parents 92464ebace8e
children 9d66d7ed2abb
comparison
equal deleted inserted replaced
6495:92464ebace8e 6496:887cca40ba6a
21 #define NGX_HTTP_V2_MAX_FRAME_SIZE ((1 << 24) - 1) 21 #define NGX_HTTP_V2_MAX_FRAME_SIZE ((1 << 24) - 1)
22 22
23 #define NGX_HTTP_V2_INT_OCTETS 4 23 #define NGX_HTTP_V2_INT_OCTETS 4
24 #define NGX_HTTP_V2_MAX_FIELD \ 24 #define NGX_HTTP_V2_MAX_FIELD \
25 (127 + (1 << (NGX_HTTP_V2_INT_OCTETS - 1) * 7) - 1) 25 (127 + (1 << (NGX_HTTP_V2_INT_OCTETS - 1) * 7) - 1)
26
27 #define NGX_HTTP_V2_DATA_DISCARD 1
28 #define NGX_HTTP_V2_DATA_ERROR 2
29 #define NGX_HTTP_V2_DATA_INTERNAL_ERROR 3
30 26
31 #define NGX_HTTP_V2_FRAME_HEADER_SIZE 9 27 #define NGX_HTTP_V2_FRAME_HEADER_SIZE 9
32 28
33 /* frame types */ 29 /* frame types */
34 #define NGX_HTTP_V2_DATA_FRAME 0x0 30 #define NGX_HTTP_V2_DATA_FRAME 0x0
193 unsigned blocked:1; 189 unsigned blocked:1;
194 unsigned exhausted:1; 190 unsigned exhausted:1;
195 unsigned in_closed:1; 191 unsigned in_closed:1;
196 unsigned out_closed:1; 192 unsigned out_closed:1;
197 unsigned rst_sent:1; 193 unsigned rst_sent:1;
198 unsigned skip_data:2; 194 unsigned no_flow_control:1;
195 unsigned skip_data:1;
199 }; 196 };
200 197
201 198
202 struct ngx_http_v2_out_frame_s { 199 struct ngx_http_v2_out_frame_s {
203 ngx_http_v2_out_frame_t *next; 200 ngx_http_v2_out_frame_t *next;