summaryrefslogtreecommitdiffhomepage
path: root/src/http/v3 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-06-30HTTP/3: error code definitions for HTTP/3 and QPACK.Roman Arutyunyan1-0/+23
2020-07-02HTTP/3: downgraded literal size error level to NGX_LOG_INFO.Roman Arutyunyan1-1/+1
Now it's similar to HTTP/2.
2020-07-02HTTP/3: refactored dynamic table implementation.Roman Arutyunyan6-164/+565
Previously dynamic table was not functional because of zero limit on its size set by default. Now the following changes enable it: - new directives to set SETTINGS_QPACK_MAX_TABLE_CAPACITY and SETTINGS_QPACK_BLOCKED_STREAMS - send settings with SETTINGS_QPACK_MAX_TABLE_CAPACITY and SETTINGS_QPACK_BLOCKED_STREAMS to the client - send Insert Count Increment to the client - send Header Acknowledgement to the client - evict old dynamic table entries on overflow - decode Required Insert Count from client - block stream if Required Insert Count is not reached
2020-07-02HTTP/3: fixed prefixed integer encoding and decoding.Roman Arutyunyan3-16/+16
Previously bytes were ordered from MSB to LSB, but the right order is the reverse.
2020-06-29HTTP/3: http3_max_field_size directive to limit string size.Roman Arutyunyan3-1/+25
Client streams may send literal strings which are now limited in size by the new directive. The default value is 4096. The directive is similar to HTTP/2 directive http2_max_field_size.
2020-06-26HTTP/3: introduced ngx_http_v3_get_module_srv_conf() macro.Roman Arutyunyan1-0/+6
The macro helps to access a module's server configuration from a QUIC stream context.
2020-06-26HTTP/3: fixed dropping first non-pseudo header.Roman Arutyunyan1-11/+38
2020-06-25HTTP/3: do not emit a DATA frame header for header_only responses.Sergey Kandaurov1-1/+1
This resulted in the frame error due to the invalid DATA frame length.
2020-05-29QUIC draft-28 transport parameters support.Sergey Kandaurov1-1/+3
Draft-27 and draft-28 support can now be enabled interchangeably, it's based on the compile-time macro NGX_QUIC_DRAFT_VERSION.
2020-05-29Renamed max_packet_size to max_udp_payload_size, from draft-28.Sergey Kandaurov1-14/+15
No functional changes.
2020-05-14HTTP/3: reallocate strings inserted into the dynamic table.Roman Arutyunyan1-3/+30
They should always be allocated from the main QUIC connection pool.
2020-05-19Fixed client buffer reallocation for HTTP/3.Roman Arutyunyan1-0/+1
Preserving pointers within the client buffer is not needed for HTTP/3 because all data is either allocated from pool or static. Unlike with HTTP/1, data typically cannot be referenced directly within the client buffer. Trying to preserve NULLs or external pointers lead to broken pointers. Also, reverted changes in ngx_http_alloc_large_header_buffer() not relevant for HTTP/3 to minimize diff to mainstream.
2020-05-19Fixed $request_length for HTTP/3.Roman Arutyunyan1-0/+2
New field r->parse_start is introduced to substitute r->request_start and r->header_name_start for request length accounting. These fields only work for this purpose in HTTP/1 because HTTP/1 request line and header line start with these values. Also, error logging is now fixed to output the right part of the request.
2020-05-19HTTP/3: restricted symbols in header names.Roman Arutyunyan2-4/+48
As per HTTP/3 draft 27, a request or response containing uppercase header field names MUST be treated as malformed. Also, existing rules applied when parsing HTTP/1 header names are also applied to HTTP/3 header names: - null character is not allowed - underscore character may or may not be treated as invalid depending on the value of "underscores_in_headers" - all non-alphanumeric characters with the exception of '-' are treated as invalid Also, the r->locase_header field is now filled while parsing an HTTP/3 header. Error logging for invalid headers is fixed as well.
2020-05-19HTTP/3: split header parser in two functions.Roman Arutyunyan2-67/+76
The first one parses pseudo-headers and is analagous to the request line parser in HTTP/1. The second one parses regular headers and is analogous to the header parser in HTTP/1. Additionally, error handling of client passing malformed uri is now fixed.
2020-05-19HTTP/3: prevent array access by negative index for unknown streams.Roman Arutyunyan1-1/+3
Currently there are no such streams, but the function ngx_http_v3_get_uni_stream() supports them.
2020-05-20Assorted fixes.Sergey Kandaurov1-1/+1
Found by Clang Static Analyzer.
2020-05-14Address validation using Retry packets.Sergey Kandaurov1-0/+18
The behaviour is toggled with the new directive "quic_retry on|off". QUIC token construction is made suitable for issuing with NEW_TOKEN.
2020-04-23Assign connection number to every QUIC stream log.Roman Arutyunyan1-2/+0
2020-04-22HTTP/3: directives with limited values converted to post handler.Sergey Kandaurov1-30/+50
The purpose is to show a precise line number with an invalid value.
2020-04-22HTTP/3: bytes holding directives changed to ngx_conf_set_size_slot.Sergey Kandaurov1-15/+15
This allows to specify directive values with measurement units.
2020-04-21HTTP/3: fixed encoding variable-length integers.Roman Arutyunyan1-5/+9
2020-04-16Added handling of incorrect values in TP configuration.Vladimir Homutov1-4/+30
Some parameters have minimal/maximum values defined by standard.
2020-04-15Added primitive flow control mechanisms.Vladimir Homutov1-4/+6
+ MAX_STREAM_DATA frame is sent when recv() is performed on stream The new value is a sum of total bytes received by stream + free space in a buffer; The sending of MAX_STREM_DATA frame in response to STREAM_DATA_BLOCKED frame is adjusted to follow the same logic as above. + MAX_DATA frame is sent when total amount of received data is 2x of current limit. The limit is doubled. + Default values of transport parameters are adjusted to more meaningful values: initial stream limits are set to quic buffer size instead of unrealistically small 255. initial max data is decreased to 16 buffer sizes, in an assumption that this is enough for a relatively short connection, instead of randomly chosen big number. All this allows to initiate a stable flow of streams that does not block on stream/connection limits (tested with FF 77.0a1 and 100K requests)
2020-04-13HTTP/3: fixed reading request body.Roman Arutyunyan1-1/+2
2020-03-28HTTP/3: http3 variable.Sergey Kandaurov1-0/+24
2020-03-28HTTP/3: static table cleanup.Sergey Kandaurov1-7/+8
2020-03-27Parsing HTTP/3 request body.Roman Arutyunyan4-0/+133
2020-03-27Chunked response body in HTTP/3.Roman Arutyunyan2-5/+31
2020-03-27Fixed buffer overflow.Roman Arutyunyan1-1/+1
2020-03-25Simplifed handling HTTP/3 streams.Roman Arutyunyan2-178/+86
2020-03-24When closing a QUIC connection, wait for all streams to finish.Roman Arutyunyan1-0/+21
Additionally, streams are now removed from the tree in cleanup handler.
2020-03-23Respect QUIC max_idle_timeout.Roman Arutyunyan1-1/+1
2020-03-23Support for HTTP/3 ALPN.Roman Arutyunyan1-0/+3
This is required by Chrome.
2020-03-23Limit output QUIC packets with client max_packet_size.Roman Arutyunyan1-3/+6
Additionally, receive larger packets than 512 bytes.
2020-03-20Removed unused variable.Roman Arutyunyan1-3/+1
2020-03-20Adedd the http "quic" variable.Vladimir Homutov1-1/+52
The value is literal "quic" for requests passed over HTTP/3, and empty string otherwise.
2020-03-20Configurable transport parameters.Vladimir Homutov2-2/+185
- integer parameters can be configured using the following directives: quic_max_idle_timeout quic_max_ack_delay quic_max_packet_size quic_initial_max_data quic_initial_max_stream_data_bidi_local quic_initial_max_stream_data_bidi_remote quic_initial_max_stream_data_uni quic_initial_max_streams_bidi quic_initial_max_streams_uni quic_ack_delay_exponent quic_active_migration quic_active_connection_id_limit - only following parameters are actually sent: active_connection_id_limit initial_max_streams_uni initial_max_streams_bidi initial_max_stream_data_bidi_local initial_max_stream_data_bidi_remote initial_max_stream_data_uni (other parameters are to be added into ngx_quic_create_transport_params() function as needed, should be easy now) - draft 24 and draft 27 are now supported (at compile-time using quic_version macro)
2020-03-19Fixed header creation for header_only responses in HTTP/3.Roman Arutyunyan1-11/+15
2020-03-18HTTP/3 $request_line variable.Roman Arutyunyan1-538/+35
2020-03-18Fixed pointer increment while parsing HTTP/3 header.Roman Arutyunyan1-3/+2
2020-03-18Fixed HTTP/3 server stream creation.Roman Arutyunyan1-5/+5
2020-03-18Removed comment.Roman Arutyunyan1-1/+0
2020-03-18Refactored HTTP/3 parser.Roman Arutyunyan7-682/+1861
2020-03-14Temporary fix for header null-termination in HTTP/3.Roman Arutyunyan1-0/+12
2020-03-13HTTP/3.Roman Arutyunyan6-0/+2764