aboutsummaryrefslogtreecommitdiff
path: root/src/http/v3/ngx_http_v3_parse.c
Commit message (Collapse)AuthorAge
* HTTP/3: fixed handling of zero-length literal field line.Sergey Kandaurov2024-05-28
| | | | Previously, st->value was passed with NULL data pointer to header handlers.
* HTTP/3: added Huffman decoding error logging.Sergey Kandaurov2023-11-14
|
* HTTP/3: removed server push support.Roman Arutyunyan2023-05-12
|
* QUIC: style.Maxim Dounin2023-05-11
|
* HTTP/3: require that field section base index is not negative.Roman Arutyunyan2022-05-26
| | | | RFC 9204 explicitly requires that.
* HTTP/3: delayed Insert Count Increment instruction.Roman Arutyunyan2022-01-27
| | | | | | | | Sending the instruction is delayed until the end of the current event cycle. Delaying the instruction is allowed by quic-qpack-21, section 2.2.2.3. The goal is to reduce the amount of data sent back to client by accumulating several inserts in one instruction and sometimes not sending the instruction at all, if Section Acknowledgement was sent just before it.
* Merged with the default branch.Ruslan Ermilov2021-12-24
|
* HTTP/3: bulk parse functions.Roman Arutyunyan2021-07-08
| | | | | Previously HTTP/3 streams were parsed by one character. Now all parse functions receive buffers. This should optimize parsing time and CPU load.
* HTTP/3: quic-qpack term updates.Sergey Kandaurov2021-07-01
| | | | | | | | Renamed header -> field per quic-qpack naming convention, in particular: - Header Field -> Field Line - Header Block -> (Encoded) Field Section - Without Name Reference -> With Literal Name - Header Acknowledgement -> Section Acknowledgment
* HTTP/3: client GOAWAY support.Roman Arutyunyan2021-06-11
|
* HTTP/3: generate more H3_FRAME_UNEXPECTED.Roman Arutyunyan2021-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per quic-http-34, these are the cases when this error should be generated: If an endpoint receives a second SETTINGS frame on the control stream, the endpoint MUST respond with a connection error of type H3_FRAME_UNEXPECTED SETTINGS frames MUST NOT be sent on any stream other than the control stream. If an endpoint receives a SETTINGS frame on a different stream, the endpoint MUST respond with a connection error of type H3_FRAME_UNEXPECTED. A client MUST NOT send a PUSH_PROMISE frame. A server MUST treat the receipt of a PUSH_PROMISE frame as a connection error of type H3_FRAME_UNEXPECTED; see Section 8. The MAX_PUSH_ID frame is always sent on the control stream. Receipt of a MAX_PUSH_ID frame on any other stream MUST be treated as a connection error of type H3_FRAME_UNEXPECTED. Receipt of an invalid sequence of frames MUST be treated as a connection error of type H3_FRAME_UNEXPECTED; see Section 8. In particular, a DATA frame before any HEADERS frame, or a HEADERS or DATA frame after the trailing HEADERS frame, is considered invalid. A CANCEL_PUSH frame is sent on the control stream. Receiving a CANCEL_PUSH frame on a stream other than the control stream MUST be treated as a connection error of type H3_FRAME_UNEXPECTED. The GOAWAY frame is always sent on the control stream.
* HTTP/3: reordered H3_MISSING_SETTINGS and H3_FRAME_UNEXPECTED.Roman Arutyunyan2021-06-11
| | | | | | | | | | | | | | | | | | | | The quic-http-34 is ambiguous as to what error should be generated for the first frame in control stream: Each side MUST initiate a single control stream at the beginning of the connection and send its SETTINGS frame as the first frame on this stream. If the first frame of the control stream is any other frame type, this MUST be treated as a connection error of type H3_MISSING_SETTINGS. If a DATA frame is received on a control stream, the recipient MUST respond with a connection error of type H3_FRAME_UNEXPECTED. If a HEADERS frame is received on a control stream, the recipient MUST respond with a connection error of type H3_FRAME_UNEXPECTED. Previously, H3_FRAME_UNEXPECTED had priority, but now H3_MISSING_SETTINGS has. The arguments in the spec sound more compelling for H3_MISSING_SETTINGS.
* HTTP/3: undo 5a92523e50d3 after parser refactoring (e1eb7f4ca9f1).Sergey Kandaurov2021-06-01
| | | | | This is no longer needed after HTTP/3 request processing has moved into its own function ngx_http_v3_process_header().
* HTTP/3: fixed parsing encoder insertions with empty header value.Sergey Kandaurov2021-06-01
| | | | | | | | When starting processing a new encoder instruction, the header state is not memzero'ed because generally it's burdensome. If the header value is empty, this resulted in inserting a stale value left from the previous instruction. Based on a patch by Zhiyong Sun.
* HTTP/3: moved parsing uni stream type to ngx_http_v3_parse.c.Roman Arutyunyan2021-05-05
| | | | | | Previously it was parsed in ngx_http_v3_streams.c, while the streams were parsed in ngx_http_v3_parse.c. Now all parsing is done in one file. This simplifies parsing API and cleans up ngx_http_v3_streams.c.
* HTTP/3: renamed ngx_http_v3_client_XXX() functions.Roman Arutyunyan2021-04-27
| | | | | The functions are renamed to ngx_http_v3_send_XXX() similar to ngx_http_v3_send_settings() and ngx_http_v3_send_goaway().
* HTTP/3: reject empty DATA and HEADERS frames on control stream.Roman Arutyunyan2021-05-05
| | | | Previously only non-empty frames were rejected.
* HTTP/3: adjusted control stream parsing.Vladimir Homutov2021-04-22
| | | | | | | | | | 7.2.1: If a DATA frame is received on a control stream, the recipient MUST respond with a connection error of type H3_FRAME_UNEXPECTED; 7.2.2: If a HEADERS frame is received on a control stream, the recipient MUST respond with a connection error (Section 8) of type H3_FRAME_UNEXPECTED.
* HTTP/3: removed http3_max_field_size.Roman Arutyunyan2021-02-16
| | | | Instead, size of one large_client_header_buffers buffer is used.
* HTTP/3: staticize internal parsing functions.Sergey Kandaurov2020-12-16
|
* HTTP/3: null-terminate empty header value.Roman Arutyunyan2020-11-17
| | | | | | | | | | Header value returned from the HTTP parser is expected to be null-terminated or have a spare byte after the value bytes. When an empty header value was passed by client in a literal header representation, neither was true. This could result in segfault. The fix is to assign a literal empty null-terminated string in this case. Thanks to Andrey Kolyshkin.
* QUIC: renamed c->qs to c->quic.Roman Arutyunyan2020-11-10
|
* HTTP/3: rearranged length check when parsing header.Roman Arutyunyan2020-09-16
| | | | The new code looks simpler and is similar to other checks.
* HTTP/3: reject HTTP/2 frames.Roman Arutyunyan2020-09-16
| | | | | | | | | As per HTTP/3 draft 30, section 7.2.8: Frame types that were used in HTTP/2 where there is no corresponding HTTP/3 frame have also been reserved (Section 11.2.1). These frame types MUST NOT be sent, and their receipt MUST be treated as a connection error of type H3_FRAME_UNEXPECTED.
* HTTP/3: skip unknown frames on request stream.Roman Arutyunyan2020-08-24
| | | | | | | | | | As per HTTP/3 draft 29, section 4.1: Frames of unknown types (Section 9), including reserved frames (Section 7.2.8) MAY be sent on a request or push stream before, after, or interleaved with other frames described in this section. Also, trailers frame is now used as an indication of the request body end.
* HTTP/3: server pushes.Roman Arutyunyan2020-07-23
| | | | | | | New directives are added: - http3_max_concurrent_pushes - http3_push - http3_push_preload
* HTTP/3: renamed server configuration variables from v3cf to h3scf.Roman Arutyunyan2020-07-23
| | | | Now they are similar to HTTP/2 where they are called h2scf.
* Fixed format specifiers.Sergey Kandaurov2020-07-20
|
* HTTP/3: simplified handling return codes from parse functions.Roman Arutyunyan2020-07-02
|
* HTTP/3: put ngx_http_v3_parse_varlen_int() return code in variable.Roman Arutyunyan2020-07-03
| | | | This makes calling this function similar to other parse functions.
* HTTP/3: simplifed handling ngx_http_v3_parse_literal() return code.Roman Arutyunyan2020-07-03
|
* HTTP/3: limited prefixed integer size by 62 bits.Roman Arutyunyan2020-07-03
|
* HTTP/3: fixed overflow in prefixed integer parser.Roman Arutyunyan2020-07-03
| | | | | | | Previously, the expression (ch & 0x7f) was promoted to a signed integer. Depending on the platform, the size of this integer could be less than 8 bytes, leading to overflow when handling the higher bits of the result. Also, sign bit of this integer could be replicated when adding to the 64-bit st->value.
* HTTP/3: fixed prefix in decoding Section Acknowledgement.Sergey Kandaurov2020-07-02
|
* HTTP/3: close QUIC connection with HTTP/QPACK errors when needed.Roman Arutyunyan2020-07-02
| | | | | | | | Previously errors led only to closing streams. To simplify closing QUIC connection from a QUIC stream context, new macro ngx_http_v3_finalize_connection() is introduced. It calls ngx_quic_finalize_connection() for the parent connection.
* HTTP/3: downgraded literal size error level to NGX_LOG_INFO.Roman Arutyunyan2020-07-02
| | | | Now it's similar to HTTP/2.
* HTTP/3: refactored dynamic table implementation.Roman Arutyunyan2020-07-02
| | | | | | | | | | | | | | | 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
* HTTP/3: fixed prefixed integer encoding and decoding.Roman Arutyunyan2020-07-02
| | | | | Previously bytes were ordered from MSB to LSB, but the right order is the reverse.
* HTTP/3: http3_max_field_size directive to limit string size.Roman Arutyunyan2020-06-29
| | | | | | | 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.
* Parsing HTTP/3 request body.Roman Arutyunyan2020-03-27
|
* Removed comment.Roman Arutyunyan2020-03-18
|
* Refactored HTTP/3 parser.Roman Arutyunyan2020-03-18