summaryrefslogtreecommitdiffhomepage
path: root/src/http (follow)
AgeCommit message (Collapse)AuthorFilesLines
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-14Merged with the default branch.Sergey Kandaurov4-43/+111
2020-04-13HTTP/3: fixed reading request body.Roman Arutyunyan1-1/+2
2020-04-08The new auth_delay directive for delaying unauthorized requests.Ruslan Ermilov2-1/+82
The request processing is delayed by a timer. Since nginx updates internal time once at the start of each event loop iteration, this normally ensures constant time delay, adding a mitigation from time-based attacks. A notable exception to this is the case when there are no additional events before the timer expires. To ensure constant-time processing in this case as well, we trigger an additional event loop iteration by posting a dummy event for the next event loop iteration.
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 Arutyunyan8-10/+167
2020-03-27Chunked response body in HTTP/3.Roman Arutyunyan3-18/+76
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-24Removed ngx_quic_stream_node_t.Roman Arutyunyan1-1/+1
Now ngx_quic_stream_t is directly inserted into the tree.
2020-03-24QUIC streams don't need filter_need_in_memory after 7f0981be07c4.Sergey Kandaurov1-1/+0
Now they inherit c->ssl always enabled from the main connection, which makes r->main_filter_need_in_memory set for them.
2020-03-23Fixed client certificate verification.Sergey Kandaurov1-0/+1
For ngx_http_process_request() part to work, this required to set both r->http_connection->ssl and c->ssl on a QUIC stream. To avoid damaging global SSL object, ngx_ssl_shutdown() is managed to ignore QUIC streams.
2020-03-23Respect QUIC max_idle_timeout.Roman Arutyunyan2-4/+2
2020-03-23Support for HTTP/3 ALPN.Roman Arutyunyan2-2/+13
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 Homutov3-3/+189
- 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 Arutyunyan2-24/+31
2020-03-18HTTP/3 $request_line variable.Roman Arutyunyan2-540/+37
2020-03-18Moved setting QUIC methods to runtime.Roman Arutyunyan2-15/+0
This allows listening to both https and http3 in the same server. Also, the change eliminates the ssl_quic directive.
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 Arutyunyan9-694/+1872
2020-03-14Temporary fix for header null-termination in HTTP/3.Roman Arutyunyan2-2/+14
2020-03-13HTTP/3.Roman Arutyunyan12-56/+2926
2020-03-13Stream "connection" read/write methods.Vladimir Homutov1-0/+31
2020-03-13Auth basic: explicitly zero out password buffer.Ruslan Ermilov1-19/+18
2020-03-12Fix build.Sergey Kandaurov1-1/+2
2020-03-12HTTP/QUIC interface reworked.Vladimir Homutov1-87/+18
- events handling moved into src/event/ngx_event_quic.c - http invokes once ngx_quic_run() and passes stream callback (diff to original http_request.c is now minimal) - streams are stored in rbtree using ID as a key - when a new stream is registered, appropriate callback is called - ngx_quic_stream_t type represents STREAM and stored in c->qs
2020-02-28Simplified subrequest finalization.Roman Arutyunyan1-23/+11
Now it looks similar to what it was before background subrequests were introduced in 9552758a786e.
2020-03-02Fixed premature background subrequest finalization.Dmitry Volyntsev1-9/+9
When "aio" or "aio threads" is used while processing the response body of an in-memory background subrequest, the subrequest could be finalized with an aio operation still in progress. Upon aio completion either parent request is woken or the old r->write_event_handler is called again. The latter may result in request errors. In either case post_subrequest handler is never called with the full response body, which is typically expected when using in-memory subrequests. Currently in nginx background subrequests are created by the upstream module and the mirror module. The issue does not manifest itself with these subrequests because they are header-only. But it can manifest itself with third-party modules which create in-memory background subrequests.
2020-02-28Added default overwrite in error_page 494.Maxim Dounin1-0/+1
We used to have default error_page overwrite for 495, 496, and 497, so a configuration like error_page 495 /error; will result in error 400, much like without any error_page configured. The 494 status code was introduced later (in 3848:de59ad6bf557, nginx 0.9.4), and relevant changes to ngx_http_core_error_page() were missed, resulting in inconsistent behaviour of "error_page 494" - with error_page configured it results in 494 being returned instead of 400. Reported by Frank Liu, http://mailman.nginx.org/pipermail/nginx/2020-February/058957.html.
2020-02-28Moved all QUIC code into ngx_event_quic.cVladimir Homutov1-545/+10
Introduced ngx_quic_input() and ngx_quic_output() as interface between nginx and protocol. They are the only functions that are exported. While there, added copyrights.
2020-02-28Introduced quic_version macro, uint16/uint32 routines ported.Sergey Kandaurov1-6/+6
2020-02-28Cleanup.Sergey Kandaurov2-51/+19
2020-02-26Generic function for HKDF expansion.Vladimir Homutov1-282/+69
2020-02-28QUIC header protection routines, introduced ngx_quic_tls_hp().Sergey Kandaurov1-38/+4
2020-02-28AEAD routines, introduced ngx_quic_tls_open()/ngx_quic_tls_seal().Sergey Kandaurov1-243/+27
2020-02-28Transport parameters stub, to complete handshake.Sergey Kandaurov1-1/+11
2020-02-28Introduced ngx_quic_secret_t.Sergey Kandaurov1-88/+88
2020-02-28QUIC handshake handler, draft 24 bump.Sergey Kandaurov1-3/+353
2020-02-28Fixed indentation.Sergey Kandaurov1-199/+196
2020-02-28PN-aware AEAD nonce, feeding proper CRYPTO length.Sergey Kandaurov1-1/+21