Mercurial > hg > nginx
annotate src/http/v3/ngx_http_v3.h @ 9295:c5623963c29e
Upstream: fixed proxy_no_cache when caching errors.
Caching errors, notably intercepted errors and internally generated
502/504 errors, as well as handling of cache revalidation with 304,
did not take into account u->conf->no_cache predicates configured.
As a result, an error might be cached even if configuration explicitly
says not to. Fix is to check u->conf->no_cache in these cases.
To simplify usage in multiple places, checking u->conf->no_cache is now
done in a separate function. As a minor optimization, u->conf->no_cache
is only checked if u->cacheable is set.
As a side effect, this change also fixes caching errors after
proxy_cache_bypass. Also, during cache revalidation u->cacheable is
now tested, so 304 responses which disable caching won't extend
cacheability of stored responses.
Additionally, when caching internally generated 502/504 errors
u->cacheable is now explicitly updated from u->headers_in.no_cache and
u->headers_in.expired, restoring the behaviour before 8041:0784ab86ad08
(1.23.0) when an error happens while reading the response headers.
Reported by Kirill A. Korinsky,
https://freenginx.org/pipermail/nginx/2024-April/000082.html
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 25 Jun 2024 21:44:50 +0300 |
parents | 4939fd04737f |
children |
rev | line source |
---|---|
8215 | 1 |
2 /* | |
3 * Copyright (C) Roman Arutyunyan | |
4 * Copyright (C) Nginx, Inc. | |
5 */ | |
6 | |
7 | |
8 #ifndef _NGX_HTTP_V3_H_INCLUDED_ | |
9 #define _NGX_HTTP_V3_H_INCLUDED_ | |
10 | |
11 | |
12 #include <ngx_config.h> | |
13 #include <ngx_core.h> | |
14 #include <ngx_http.h> | |
8773
b43e50f47b2e
HTTP/3: separate header files for existing source files.
Roman Arutyunyan <arut@nginx.com>
parents:
8772
diff
changeset
|
15 |
8226
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
16 #include <ngx_http_v3_parse.h> |
8773
b43e50f47b2e
HTTP/3: separate header files for existing source files.
Roman Arutyunyan <arut@nginx.com>
parents:
8772
diff
changeset
|
17 #include <ngx_http_v3_encode.h> |
8925 | 18 #include <ngx_http_v3_uni.h> |
19 #include <ngx_http_v3_table.h> | |
8215 | 20 |
21 | |
8918
606bf52888d2
HTTP/3: adjusted ALPN macro names to align with 61abb35bb8cf.
Sergey Kandaurov <pluknet@nginx.com>
parents:
8903
diff
changeset
|
22 #define NGX_HTTP_V3_ALPN_PROTO "\x02h3" |
8922
be08b858086a
HTTP/3: http3_hq directive and NGX_HTTP_V3_HQ macro.
Roman Arutyunyan <arut@nginx.com>
parents:
8921
diff
changeset
|
23 #define NGX_HTTP_V3_HQ_ALPN_PROTO "\x0Ahq-interop" |
9081
c851a2ed5ce8
HTTP/3: "quic" parameter of "listen" directive.
Roman Arutyunyan <arut@nginx.com>
parents:
9058
diff
changeset
|
24 #define NGX_HTTP_V3_HQ_PROTO "hq-interop" |
8921
33226ac61076
HTTP/3: merged ngx_http_quic_module into ngx_http_v3_module.
Roman Arutyunyan <arut@nginx.com>
parents:
8918
diff
changeset
|
25 |
8226
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
26 #define NGX_HTTP_V3_VARLEN_INT_LEN 4 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
27 #define NGX_HTTP_V3_PREFIX_INT_LEN 11 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
28 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
29 #define NGX_HTTP_V3_STREAM_CONTROL 0x00 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
30 #define NGX_HTTP_V3_STREAM_PUSH 0x01 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
31 #define NGX_HTTP_V3_STREAM_ENCODER 0x02 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
32 #define NGX_HTTP_V3_STREAM_DECODER 0x03 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
33 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
34 #define NGX_HTTP_V3_FRAME_DATA 0x00 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
35 #define NGX_HTTP_V3_FRAME_HEADERS 0x01 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
36 #define NGX_HTTP_V3_FRAME_CANCEL_PUSH 0x03 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
37 #define NGX_HTTP_V3_FRAME_SETTINGS 0x04 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
38 #define NGX_HTTP_V3_FRAME_PUSH_PROMISE 0x05 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
39 #define NGX_HTTP_V3_FRAME_GOAWAY 0x07 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
40 #define NGX_HTTP_V3_FRAME_MAX_PUSH_ID 0x0d |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
41 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
42 #define NGX_HTTP_V3_PARAM_MAX_TABLE_CAPACITY 0x01 |
9020
efbcdb9b37dc
HTTP/3: updated SETTINGS_MAX_FIELD_SECTION_SIZE name.
Sergey Kandaurov <pluknet@nginx.com>
parents:
8988
diff
changeset
|
43 #define NGX_HTTP_V3_PARAM_MAX_FIELD_SECTION_SIZE 0x06 |
8226
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8215
diff
changeset
|
44 #define NGX_HTTP_V3_PARAM_BLOCKED_STREAMS 0x07 |
8215 | 45 |
8924
d6ef13c5fd8e
QUIC: simplified configuration.
Vladimir Homutov <vl@nginx.com>
parents:
8922
diff
changeset
|
46 #define NGX_HTTP_V3_MAX_TABLE_CAPACITY 4096 |
d6ef13c5fd8e
QUIC: simplified configuration.
Vladimir Homutov <vl@nginx.com>
parents:
8922
diff
changeset
|
47 |
8283
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
8269
diff
changeset
|
48 #define NGX_HTTP_V3_STREAM_CLIENT_CONTROL 0 |
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
8269
diff
changeset
|
49 #define NGX_HTTP_V3_STREAM_SERVER_CONTROL 1 |
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
8269
diff
changeset
|
50 #define NGX_HTTP_V3_STREAM_CLIENT_ENCODER 2 |
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
8269
diff
changeset
|
51 #define NGX_HTTP_V3_STREAM_SERVER_ENCODER 3 |
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
8269
diff
changeset
|
52 #define NGX_HTTP_V3_STREAM_CLIENT_DECODER 4 |
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
8269
diff
changeset
|
53 #define NGX_HTTP_V3_STREAM_SERVER_DECODER 5 |
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
8269
diff
changeset
|
54 #define NGX_HTTP_V3_MAX_KNOWN_STREAM 6 |
8924
d6ef13c5fd8e
QUIC: simplified configuration.
Vladimir Homutov <vl@nginx.com>
parents:
8922
diff
changeset
|
55 #define NGX_HTTP_V3_MAX_UNI_STREAMS 3 |
8283
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
8269
diff
changeset
|
56 |
8459
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
57 /* HTTP/3 errors */ |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
58 #define NGX_HTTP_V3_ERR_NO_ERROR 0x100 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
59 #define NGX_HTTP_V3_ERR_GENERAL_PROTOCOL_ERROR 0x101 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
60 #define NGX_HTTP_V3_ERR_INTERNAL_ERROR 0x102 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
61 #define NGX_HTTP_V3_ERR_STREAM_CREATION_ERROR 0x103 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
62 #define NGX_HTTP_V3_ERR_CLOSED_CRITICAL_STREAM 0x104 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
63 #define NGX_HTTP_V3_ERR_FRAME_UNEXPECTED 0x105 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
64 #define NGX_HTTP_V3_ERR_FRAME_ERROR 0x106 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
65 #define NGX_HTTP_V3_ERR_EXCESSIVE_LOAD 0x107 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
66 #define NGX_HTTP_V3_ERR_ID_ERROR 0x108 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
67 #define NGX_HTTP_V3_ERR_SETTINGS_ERROR 0x109 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
68 #define NGX_HTTP_V3_ERR_MISSING_SETTINGS 0x10a |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
69 #define NGX_HTTP_V3_ERR_REQUEST_REJECTED 0x10b |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
70 #define NGX_HTTP_V3_ERR_REQUEST_CANCELLED 0x10c |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
71 #define NGX_HTTP_V3_ERR_REQUEST_INCOMPLETE 0x10d |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
72 #define NGX_HTTP_V3_ERR_CONNECT_ERROR 0x10f |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
73 #define NGX_HTTP_V3_ERR_VERSION_FALLBACK 0x110 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
74 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
75 /* QPACK errors */ |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
76 #define NGX_HTTP_V3_ERR_DECOMPRESSION_FAILED 0x200 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
77 #define NGX_HTTP_V3_ERR_ENCODER_STREAM_ERROR 0x201 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
78 #define NGX_HTTP_V3_ERR_DECODER_STREAM_ERROR 0x202 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
8456
diff
changeset
|
79 |
8215 | 80 |
9161
4939fd04737f
HTTP/3: postponed session creation to init() callback.
Roman Arutyunyan <arut@nginx.com>
parents:
9108
diff
changeset
|
81 #define ngx_http_v3_get_session(c) \ |
4939fd04737f
HTTP/3: postponed session creation to init() callback.
Roman Arutyunyan <arut@nginx.com>
parents:
9108
diff
changeset
|
82 ((ngx_http_v3_session_t *) ((c)->quic ? (c)->quic->parent->data \ |
8988
6434160b4b78
QUIC: allowed main QUIC connection for some operations.
Roman Arutyunyan <arut@nginx.com>
parents:
8979
diff
changeset
|
83 : (c)->data)) |
8921
33226ac61076
HTTP/3: merged ngx_http_quic_module into ngx_http_v3_module.
Roman Arutyunyan <arut@nginx.com>
parents:
8918
diff
changeset
|
84 |
9161
4939fd04737f
HTTP/3: postponed session creation to init() callback.
Roman Arutyunyan <arut@nginx.com>
parents:
9108
diff
changeset
|
85 #define ngx_http_quic_get_connection(c) \ |
4939fd04737f
HTTP/3: postponed session creation to init() callback.
Roman Arutyunyan <arut@nginx.com>
parents:
9108
diff
changeset
|
86 (ngx_http_v3_get_session(c)->http_connection) |
8768
40d710a66aef
HTTP/3: ngx_http_v3_get_session() macro.
Roman Arutyunyan <arut@nginx.com>
parents:
8742
diff
changeset
|
87 |
8725
98c4020f1c9a
HTTP/3: keepalive timeout.
Roman Arutyunyan <arut@nginx.com>
parents:
8724
diff
changeset
|
88 #define ngx_http_v3_get_module_loc_conf(c, module) \ |
9105 | 89 ngx_http_get_module_loc_conf(ngx_http_quic_get_connection(c)->conf_ctx, \ |
8769
9ec3e71f8a61
HTTP/3: reference h3c directly from ngx_http_connection_t.
Roman Arutyunyan <arut@nginx.com>
parents:
8768
diff
changeset
|
90 module) |
8725
98c4020f1c9a
HTTP/3: keepalive timeout.
Roman Arutyunyan <arut@nginx.com>
parents:
8724
diff
changeset
|
91 |
8453
c8cabb5d45f5
HTTP/3: introduced ngx_http_v3_get_module_srv_conf() macro.
Roman Arutyunyan <arut@nginx.com>
parents:
8406
diff
changeset
|
92 #define ngx_http_v3_get_module_srv_conf(c, module) \ |
9105 | 93 ngx_http_get_module_srv_conf(ngx_http_quic_get_connection(c)->conf_ctx, \ |
8769
9ec3e71f8a61
HTTP/3: reference h3c directly from ngx_http_connection_t.
Roman Arutyunyan <arut@nginx.com>
parents:
8768
diff
changeset
|
94 module) |
8453
c8cabb5d45f5
HTTP/3: introduced ngx_http_v3_get_module_srv_conf() macro.
Roman Arutyunyan <arut@nginx.com>
parents:
8406
diff
changeset
|
95 |
8460
72f9ff4e0a88
HTTP/3: close QUIC connection with HTTP/QPACK errors when needed.
Roman Arutyunyan <arut@nginx.com>
parents:
8459
diff
changeset
|
96 #define ngx_http_v3_finalize_connection(c, code, reason) \ |
8988
6434160b4b78
QUIC: allowed main QUIC connection for some operations.
Roman Arutyunyan <arut@nginx.com>
parents:
8979
diff
changeset
|
97 ngx_quic_finalize_connection((c)->quic ? (c)->quic->parent : (c), \ |
6434160b4b78
QUIC: allowed main QUIC connection for some operations.
Roman Arutyunyan <arut@nginx.com>
parents:
8979
diff
changeset
|
98 code, reason) |
8460
72f9ff4e0a88
HTTP/3: close QUIC connection with HTTP/QPACK errors when needed.
Roman Arutyunyan <arut@nginx.com>
parents:
8459
diff
changeset
|
99 |
8724
fc64ab301bad
QUIC: connection shutdown.
Roman Arutyunyan <arut@nginx.com>
parents:
8723
diff
changeset
|
100 #define ngx_http_v3_shutdown_connection(c, code, reason) \ |
8988
6434160b4b78
QUIC: allowed main QUIC connection for some operations.
Roman Arutyunyan <arut@nginx.com>
parents:
8979
diff
changeset
|
101 ngx_quic_shutdown_connection((c)->quic ? (c)->quic->parent : (c), \ |
6434160b4b78
QUIC: allowed main QUIC connection for some operations.
Roman Arutyunyan <arut@nginx.com>
parents:
8979
diff
changeset
|
102 code, reason) |
8724
fc64ab301bad
QUIC: connection shutdown.
Roman Arutyunyan <arut@nginx.com>
parents:
8723
diff
changeset
|
103 |
8453
c8cabb5d45f5
HTTP/3: introduced ngx_http_v3_get_module_srv_conf() macro.
Roman Arutyunyan <arut@nginx.com>
parents:
8406
diff
changeset
|
104 |
8215 | 105 typedef struct { |
9081
c851a2ed5ce8
HTTP/3: "quic" parameter of "listen" directive.
Roman Arutyunyan <arut@nginx.com>
parents:
9058
diff
changeset
|
106 ngx_flag_t enable; |
c851a2ed5ce8
HTTP/3: "quic" parameter of "listen" directive.
Roman Arutyunyan <arut@nginx.com>
parents:
9058
diff
changeset
|
107 ngx_flag_t enable_hq; |
8456
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
8454
diff
changeset
|
108 size_t max_table_capacity; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
8454
diff
changeset
|
109 ngx_uint_t max_blocked_streams; |
8924
d6ef13c5fd8e
QUIC: simplified configuration.
Vladimir Homutov <vl@nginx.com>
parents:
8922
diff
changeset
|
110 ngx_uint_t max_concurrent_streams; |
8921
33226ac61076
HTTP/3: merged ngx_http_quic_module into ngx_http_v3_module.
Roman Arutyunyan <arut@nginx.com>
parents:
8918
diff
changeset
|
111 ngx_quic_conf_t quic; |
8456
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
8454
diff
changeset
|
112 } ngx_http_v3_srv_conf_t; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
8454
diff
changeset
|
113 |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
8454
diff
changeset
|
114 |
8706
3057bae4dba7
HTTP/3: introduced ngx_http_v3_parse_t structure.
Roman Arutyunyan <arut@nginx.com>
parents:
8705
diff
changeset
|
115 struct ngx_http_v3_parse_s { |
8707
ffcaf0aad9f2
HTTP/3: limited client header size.
Roman Arutyunyan <arut@nginx.com>
parents:
8706
diff
changeset
|
116 size_t header_limit; |
8706
3057bae4dba7
HTTP/3: introduced ngx_http_v3_parse_t structure.
Roman Arutyunyan <arut@nginx.com>
parents:
8705
diff
changeset
|
117 ngx_http_v3_parse_headers_t headers; |
3057bae4dba7
HTTP/3: introduced ngx_http_v3_parse_t structure.
Roman Arutyunyan <arut@nginx.com>
parents:
8705
diff
changeset
|
118 ngx_http_v3_parse_data_t body; |
8958
10522e8dea41
HTTP/3: improved processing of multiple Cookie field lines.
Sergey Kandaurov <pluknet@nginx.com>
parents:
8925
diff
changeset
|
119 ngx_array_t *cookies; |
8706
3057bae4dba7
HTTP/3: introduced ngx_http_v3_parse_t structure.
Roman Arutyunyan <arut@nginx.com>
parents:
8705
diff
changeset
|
120 }; |
3057bae4dba7
HTTP/3: introduced ngx_http_v3_parse_t structure.
Roman Arutyunyan <arut@nginx.com>
parents:
8705
diff
changeset
|
121 |
3057bae4dba7
HTTP/3: introduced ngx_http_v3_parse_t structure.
Roman Arutyunyan <arut@nginx.com>
parents:
8705
diff
changeset
|
122 |
8770
67f0eb150047
HTTP/3: renamed ngx_http_v3_connection_t to ngx_http_v3_session_t.
Roman Arutyunyan <arut@nginx.com>
parents:
8769
diff
changeset
|
123 struct ngx_http_v3_session_s { |
9161
4939fd04737f
HTTP/3: postponed session creation to init() callback.
Roman Arutyunyan <arut@nginx.com>
parents:
9108
diff
changeset
|
124 ngx_http_connection_t *http_connection; |
4939fd04737f
HTTP/3: postponed session creation to init() callback.
Roman Arutyunyan <arut@nginx.com>
parents:
9108
diff
changeset
|
125 |
8456
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
8454
diff
changeset
|
126 ngx_http_v3_dynamic_table_t table; |
8497 | 127 |
8725
98c4020f1c9a
HTTP/3: keepalive timeout.
Roman Arutyunyan <arut@nginx.com>
parents:
8724
diff
changeset
|
128 ngx_event_t keepalive; |
98c4020f1c9a
HTTP/3: keepalive timeout.
Roman Arutyunyan <arut@nginx.com>
parents:
8724
diff
changeset
|
129 ngx_uint_t nrequests; |
98c4020f1c9a
HTTP/3: keepalive timeout.
Roman Arutyunyan <arut@nginx.com>
parents:
8724
diff
changeset
|
130 |
8456
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
8454
diff
changeset
|
131 ngx_queue_t blocked; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
8454
diff
changeset
|
132 ngx_uint_t nblocked; |
8497 | 133 |
9055
1192923be0aa
QUIC: idle mode for main connection.
Roman Arutyunyan <arut@nginx.com>
parents:
9054
diff
changeset
|
134 uint64_t next_request_id; |
8497 | 135 |
8881
72b304f6207c
HTTP/3: traffic-based flood detection.
Roman Arutyunyan <arut@nginx.com>
parents:
8829
diff
changeset
|
136 off_t total_bytes; |
72b304f6207c
HTTP/3: traffic-based flood detection.
Roman Arutyunyan <arut@nginx.com>
parents:
8829
diff
changeset
|
137 off_t payload_bytes; |
72b304f6207c
HTTP/3: traffic-based flood detection.
Roman Arutyunyan <arut@nginx.com>
parents:
8829
diff
changeset
|
138 |
9054
6546c2ae1c7b
HTTP/3: unified hq code with regular HTTP/3 code.
Roman Arutyunyan <arut@nginx.com>
parents:
9020
diff
changeset
|
139 unsigned goaway:1; |
6546c2ae1c7b
HTTP/3: unified hq code with regular HTTP/3 code.
Roman Arutyunyan <arut@nginx.com>
parents:
9020
diff
changeset
|
140 unsigned hq:1; |
8742
47a43b011dec
HTTP/3: keepalive_time support.
Sergey Kandaurov <pluknet@nginx.com>
parents:
8740
diff
changeset
|
141 |
8456
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
8454
diff
changeset
|
142 ngx_connection_t *known_streams[NGX_HTTP_V3_MAX_KNOWN_STREAM]; |
8769
9ec3e71f8a61
HTTP/3: reference h3c directly from ngx_http_connection_t.
Roman Arutyunyan <arut@nginx.com>
parents:
8768
diff
changeset
|
143 }; |
8456
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
8454
diff
changeset
|
144 |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
8454
diff
changeset
|
145 |
9057
7b83da3bdf9f
HTTP/3: renamed functions.
Roman Arutyunyan <arut@nginx.com>
parents:
9055
diff
changeset
|
146 void ngx_http_v3_init_stream(ngx_connection_t *c); |
7b83da3bdf9f
HTTP/3: renamed functions.
Roman Arutyunyan <arut@nginx.com>
parents:
9055
diff
changeset
|
147 void ngx_http_v3_reset_stream(ngx_connection_t *c); |
8773
b43e50f47b2e
HTTP/3: separate header files for existing source files.
Roman Arutyunyan <arut@nginx.com>
parents:
8772
diff
changeset
|
148 ngx_int_t ngx_http_v3_init_session(ngx_connection_t *c); |
8881
72b304f6207c
HTTP/3: traffic-based flood detection.
Roman Arutyunyan <arut@nginx.com>
parents:
8829
diff
changeset
|
149 ngx_int_t ngx_http_v3_check_flood(ngx_connection_t *c); |
9058
b0c2234aaa9f
QUIC: application init() callback.
Roman Arutyunyan <arut@nginx.com>
parents:
9057
diff
changeset
|
150 ngx_int_t ngx_http_v3_init(ngx_connection_t *c); |
9055
1192923be0aa
QUIC: idle mode for main connection.
Roman Arutyunyan <arut@nginx.com>
parents:
9054
diff
changeset
|
151 void ngx_http_v3_shutdown(ngx_connection_t *c); |
8773
b43e50f47b2e
HTTP/3: separate header files for existing source files.
Roman Arutyunyan <arut@nginx.com>
parents:
8772
diff
changeset
|
152 |
8689
6bd8ed493b85
HTTP/3: refactored request body parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8681
diff
changeset
|
153 ngx_int_t ngx_http_v3_read_request_body(ngx_http_request_t *r); |
6bd8ed493b85
HTTP/3: refactored request body parser.
Roman Arutyunyan <arut@nginx.com>
parents:
8681
diff
changeset
|
154 ngx_int_t ngx_http_v3_read_unbuffered_request_body(ngx_http_request_t *r); |
8215 | 155 |
156 | |
157 extern ngx_module_t ngx_http_v3_module; | |
158 | |
159 | |
160 #endif /* _NGX_HTTP_V3_H_INCLUDED_ */ |