summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2016-07-05nginx-1.11.2-RELEASErelease-1.11.2Maxim Dounin1-0/+113
2016-07-05Updated PCRE used for win32 builds.Maxim Dounin1-1/+1
2016-05-18Stream: return module.Roman Arutyunyan3-0/+218
2016-06-29Stream: SSL-related variables.Vladimir Homutov1-1/+114
2016-06-29Stream: got rid of pseudo variables.Vladimir Homutov3-92/+124
Stream limit_conn, upstream_hash and proxy modules now use complex values.
2016-06-29Stream: map module.Vladimir Homutov3-0/+585
2016-06-14Stream: core module variables.Vladimir Homutov1-0/+350
2016-07-04Stream: variables and script.Vladimir Homutov9-57/+1849
This is a port of corresponding http code with unrelated features excluded.
2016-06-15Stream: added preconfiguration step.Vladimir Homutov11-2/+27
2016-07-02Sub filter: eliminate unnecessary buffering.Roman Arutyunyan1-4/+37
Previously, when a buffer was processed by the sub filter, its final bytes could be buffered by the filter even if they don't match any pattern. This happened because the Boyer-Moore algorithm, employed by the sub filter since b9447fc457b4 (1.9.4), matches the last characters of patterns prior to checking other characters. If the last character is out of scope, initial bytes of a potential match are buffered until the last character is available. Now, after receiving a flush or recycled buffer, the filter performs additional checks to reduce the number of buffered bytes. The potential match is checked against the initial parts of all patterns. Non-matching bytes are not buffered. This improves processing of a chunked response from upstream by sending the entire chunks without buffering unless a partial match is found at the end of a chunk.
2016-07-02Sub filter: introduced the ngx_http_sub_match() function.Roman Arutyunyan1-31/+52
No functional changes.
2016-06-30Internal md5 and sha1 implementations are now always used.Maxim Dounin26-664/+39
This reduces the number of moving parts in ABI compatibility checks. Additionally, it also allows to use OpenSSL in FIPS mode while still using md5 for non-security tasks.
2016-06-29Removed unused flag accept_context_updated from ngx_event_t.Ruslan Ermilov3-11/+2
Also, removed practically unused flag accept_context_updated from ngx_connection_t.
2016-06-27Style.Roman Arutyunyan1-10/+10
2016-06-22HTTP/2: style.Piotr Sikora1-6/+4
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2016-06-22Style.Roman Arutyunyan1-1/+0
2016-06-22Stream: use ngx_pcalloc() in ngx_stream_proxy_bind().Roman Arutyunyan1-1/+1
2016-06-20Fixed build on MSVC.Roman Arutyunyan2-2/+2
2016-06-20Stream: set SO_REUSEADDR for UDP upstream sockets.Roman Arutyunyan1-1/+25
The option is only set if the socket is bound to a specific port to allow several such sockets coexist at the same time. This is required, for example, when nginx acts as a transparent proxy and receives two datagrams from the same client in a short time. The feature is only implemented for Linux.
2016-06-20Stream: support for $remote_port in proxy_bind.Roman Arutyunyan1-9/+20
The following two types of bind addresses are supported in addition to $remote_addr and address literals: - $remote_addr:$remote_port - [$remote_addr]:$remote_port In both cases client remote address with port is used in upstream socket bind.
2016-06-20Upstream: support for port in proxy_bind and friends.Roman Arutyunyan2-3/+5
2016-06-20Introduced ngx_inet_get_port() and ngx_inet_set_port() functions.Roman Arutyunyan15-317/+90
2016-06-20Set IP_BIND_ADDRESS_NO_PORT socket option for upstream sockets.Andrei Belov2-0/+39
2016-06-15SSL: ngx_ssl_ciphers() to set list of ciphers.Tim Taubert8-62/+40
This patch moves various OpenSSL-specific function calls into the OpenSSL module and introduces ngx_ssl_ciphers() to make nginx more crypto-library-agnostic.
2016-06-16HTTP/2: fixed the "http request count is zero" alert.Valentin Bartenev1-0/+1
When the stream is terminated the HEADERS frame can still wait in the output queue. This frame can't be removed and must be sent to the client anyway, since HTTP/2 uses stateful compression for headers. So in order to postpone closing and freeing memory of such stream the special close stream handler is set to the write event. After the HEADERS frame is sent the write event is called and the stream will be finally closed. Some events like receiving a RST_STREAM can trigger the read handler of such stream in closing state and cause unexpected processing that can result in another attempt to finalize the request. To prevent it the read handler is now set to ngx_http_empty_handler. Thanks to Amazon.
2016-06-16HTTP/2: avoid adding Content-Length for requests without body.Valentin Bartenev1-2/+4
There is no reason to add the "Content-Length: 0" header to a proxied request without body if the header isn't presented in the original request. Thanks to Amazon.
2016-06-16HTTP/2: prevented double termination of a stream.Valentin Bartenev1-0/+5
According to RFC 7540, an endpoint should not send more than one RST_STREAM frame for any stream. Also, now all the data frames will be skipped while termination.
2016-06-16HTTP/2: fixed a segfault while processing unbuffered upload.Valentin Bartenev1-4/+0
The ngx_http_v2_finalize_connection() closes current stream, but that is an invalid operation while processing unbuffered upload. This results in access to already freed memory, since the upstream module sets a cleanup handler that also finalizes the request.
2016-06-09An internal SHA1 implementation.Maxim Dounin4-13/+320
2016-06-08Fixed spelling.Otto Kekäläinen1-1/+1
2016-06-07Fixed an error log message.Valentin Bartenev1-1/+1
2016-06-07Configure: revised GCC version processing.Sergey Kandaurov1-7/+6
Now GCC 6 and onwards will use -Wno-unused-parameter.
2016-06-07Version bump.Sergey Kandaurov1-2/+2
2016-05-31release-1.11.1 tagMaxim Dounin1-0/+1
2016-05-31nginx-1.11.1-RELEASErelease-1.11.1Maxim Dounin1-0/+20
2016-05-31Core: skip special buffers on writing (ticket #981).Maxim Dounin1-0/+5
A special last buffer with cl->buf->pos set to NULL can be present in a chain when writing request body if chunked encoding was used. This resulted in a NULL pointer dereference if it happened to be the only buffer left after a do...while loop iteration in ngx_write_chain_to_file(). The problem originally appeared in nginx 1.3.9 with chunked encoding support. Additionally, rev. 3832b608dc8d (nginx 1.9.13) changed the minimum number of buffers to trigger this from IOV_MAX (typically 1024) to NGX_IOVS_PREALLOCATE (typically 64). Fix is to skip such buffers in ngx_chain_to_iovec(), much like it is done in other places.
2016-05-30Trailing spaces removed.Maxim Dounin1-2/+2
2016-05-24HTTP/2: unbreak build on MSVC.Valentin Bartenev1-1/+1
2016-05-24Version bump.Valentin Bartenev1-2/+2
2016-05-24release-1.11.0 tagMaxim Dounin1-0/+1
2016-05-24nginx-1.11.0-RELEASErelease-1.11.0Maxim Dounin1-0/+156
2016-05-24Updated OpenSSL used for win32 builds.Maxim Dounin1-1/+1
2016-05-24Fixed build on MSVC.Maxim Dounin1-2/+2
2016-05-24HTTP/2: implemented preread buffer for request body (closes #959).Valentin Bartenev4-43/+146
Previously, the stream's window was kept zero in order to prevent a client from sending the request body before it was requested (see 887cca40ba6a for details). Until such initial window was acknowledged all requests with data were rejected (see 0aa07850922f for details). That approach revealed a number of problems: 1. Some clients (notably MS IE/Edge, Safari, iOS applications) show an error or even crash if a stream is rejected; 2. This requires at least one RTT for every request with body before the client receives window update and able to send data. To overcome these problems the new directive "http2_body_preread_size" is introduced. It sets the initial window and configures a special per stream preread buffer that is used to save all incoming data before the body is requested and processed. If the directive's value is lower than the default initial window (65535), as previously, all streams with data will be rejected until the new window is acknowledged. Otherwise, no special processing is used and all requests with data are welcome right from the connection start. The default value is chosen to be 64k, which is bigger than the default initial window. Setting it to zero is fully complaint to the previous behavior.
2016-05-23Realip: detect duplicate real_ip_header directive.Ruslan Ermilov1-0/+4
2016-05-23Realip: port support in X-Real-IP and X-Forwarded-For.Dmitry Volyntsev3-1/+84
Now, the module extracts optional port which may accompany an IP address. This custom extension is introduced, among other things, in order to facilitate logging of original client ports. Addresses with ports are expected to be in the RFC 3986 format, that is, with IPv6 addresses in square brackets. E.g., "X-Real-IP: [2001:0db8::1]:12345" sets client port ($remote_port) to 12345.
2016-05-23Realip: take client port from PROXY protocol header.Dmitry Volyntsev1-0/+22
Previously, when the client address was changed to the one from the PROXY protocol header, the client port ($remote_port) was reset to zero. Now the client port is also changed to the one from the PROXY protocol header.
2016-05-23Added the $realip_remote_port variable.Dmitry Volyntsev1-4/+71
2016-05-23Added the $proxy_protocol_port variable.Dmitry Volyntsev3-4/+69
2016-05-23Renamed "u" to "sockaddr" in listen options types.Maxim Dounin9-46/+48