comparison src/http/v2/ngx_http_v2_module.h @ 9119:08ef02ad5c54

HTTP/2: "http2" directive. The directive enables HTTP/2 in the current server. The previous way to enable HTTP/2 via "listen ... http2" is now deprecated. The new approach allows to share HTTP/2 and HTTP/0.9-1.1 on the same port. For SSL connections, HTTP/2 is now selected by ALPN callback based on whether the protocol is enabled in the virtual server chosen by SNI. This however only works since OpenSSL 1.0.2h, where ALPN callback is invoked after SNI callback. For older versions of OpenSSL, HTTP/2 is enabled based on the default virtual server configuration. For plain TCP connections, HTTP/2 is now auto-detected by HTTP/2 preface, if HTTP/2 is enabled in the default virtual server. If preface is not matched, HTTP/0.9-1.1 is assumed.
author Roman Arutyunyan <arut@nginx.com>
date Tue, 16 May 2023 16:30:08 +0400
parents 827202ca1269
children 262c01782566
comparison
equal deleted inserted replaced
9118:b4a57278bf24 9119:08ef02ad5c54
19 u_char *recv_buffer; 19 u_char *recv_buffer;
20 } ngx_http_v2_main_conf_t; 20 } ngx_http_v2_main_conf_t;
21 21
22 22
23 typedef struct { 23 typedef struct {
24 size_t pool_size;
25 ngx_uint_t concurrent_streams;
26 ngx_uint_t concurrent_pushes;
27 size_t preread_size;
28 ngx_uint_t streams_index_mask;
29 } ngx_http_v2_srv_conf_t;
30
31
32 typedef struct {
33 size_t chunk_size; 24 size_t chunk_size;
34 25
35 ngx_flag_t push_preload; 26 ngx_flag_t push_preload;
36 27
37 ngx_flag_t push; 28 ngx_flag_t push;
38 ngx_array_t *pushes; 29 ngx_array_t *pushes;
39 } ngx_http_v2_loc_conf_t; 30 } ngx_http_v2_loc_conf_t;
40 31
41 32
42 extern ngx_module_t ngx_http_v2_module;
43
44
45 #endif /* _NGX_HTTP_V2_MODULE_H_INCLUDED_ */ 33 #endif /* _NGX_HTTP_V2_MODULE_H_INCLUDED_ */