summaryrefslogtreecommitdiffhomepage
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-11-07SPDY: fixed check for too long header name or value.Valentin Bartenev1-3/+3
For further progress a new buffer must be at least two bytes larger than the remaining unparsed data. One more byte is needed for null-termination and another one for further progress. Otherwise inflate() fails with Z_BUF_ERROR.
2014-11-07SPDY: improved debug logging of inflate() calls.Valentin Bartenev1-4/+16
2014-11-17SSL: logging level of "inappropriate fallback" (ticket #662).Maxim Dounin1-0/+3
Patch by Erik Dubbelboer.
2014-11-04Upstream: support named location for X-Accel-Redirect.Toshikuni Fukaya1-9/+16
2014-10-30Upstream: add "proxy_ssl_certificate" and friends.Piotr Sikora2-0/+154
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-11-07SPDY: fixed "too long header line" logging.Maxim Dounin1-2/+1
This fixes possible one byte buffer overrun and makes sure ellipsis are always added, see 21043ce2a005.
2014-11-05Cache: removed dead store in ngx_http_file_cache_vary_header().Maxim Dounin1-1/+0
Found by Clang Static Analyzer.
2014-08-25Access log: cancel the flush timer on graceful shutdown.Valentin Bartenev1-1/+15
Previously, it could prevent a worker process from exiting for up to the configured flush timeout.
2014-08-13Events: introduced cancelable timers.Valentin Bartenev5-0/+49
2014-08-25Events: simplified cycle in ngx_event_expire_timers().Valentin Bartenev1-18/+16
2014-08-25Events: removed broken thread support from event timers.Valentin Bartenev5-55/+7
It's mostly dead code. And the idea of thread support for this task has been deprecated.
2014-10-24SSL: simplified ssl_password_file error handling.Sergey Kandaurov1-14/+3
Instead of collecting a number of the possible SSL_CTX_use_PrivateKey_file() error codes that becomes more and more difficult with the rising variety of OpenSSL versions and its derivatives, just continue with the next password. Multiple passwords in a single ssl_password_file feature was broken after recent OpenSSL changes (commit 4aac102f75b517bdb56b1bcfd0a856052d559f6e). Affected OpenSSL releases: 0.9.8zc, 1.0.0o, 1.0.1j and 1.0.2-beta3. Reported by Piotr Sikora.
2014-10-27SPDY: stop emitting multiple empty header values.Piotr Sikora1-2/+6
Previously, nginx would emit empty values in a header with multiple, NULL-separated values. This is forbidden by the SPDY specification, which requires headers to have either a single (possibly empty) value or multiple, NULL-separated non-empty values. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-10-28Version bump.Valentin Bartenev1-2/+2
2014-10-15Win32: made build-able with MinGW-w64 gcc.Kouhei Sutou1-2/+35
2014-10-27Upstream: limited next_upstream time and tries when resolving DNS.Gu Feng1-0/+8
When got multiple upstream IP addresses using DNS resolving, the number of upstreams tries and the maxinum time spent for these tries were not affected. This patch fixed it.
2014-10-28Write filter: stored delay in a variable, no functional changes.Roman Arutyunyan1-2/+2
The code is now similar to ngx_event_pipe_read_upstream().
2014-10-28Upstream: proxy_limit_rate and friends.Roman Arutyunyan8-9/+130
The directives limit the upstream read rate. For example, "proxy_limit_rate 42" limits proxy upstream read rate to 42 bytes per second.
2014-10-28Core: added limit to recv_chain().Roman Arutyunyan8-20/+57
2014-10-27Cache: normalization of some Vary headers.Maxim Dounin1-2/+66
Spaces in Accept-Charset, Accept-Encoding, and Accept-Language headers are now ignored. As per syntax of these headers spaces can only appear in places where they are optional.
2014-10-27Cache: multiple variants of a resource now can be stored.Maxim Dounin2-3/+79
If a variant stored can't be used to respond to a request, the variant hash is used as a secondary key. Additionally, if we previously switched to a secondary key, while storing a response to cache we check if the variant hash still apply. If not, we switch back to the original key, to handle cases when Vary changes.
2014-10-27Cache: c->reading flag introduced.Maxim Dounin2-1/+5
It replaces c->buf in checks in ngx_http_file_cache_open(), making it possible to reopen the file without clearing c->buf. No functional changes.
2014-10-27Cache: hash of Vary headers now stored in cache.Maxim Dounin3-2/+153
To cache responses with Vary, we now calculate hash of headers listed in Vary, and return the response from cache only if new request headers match. As of now, only one variant of the same resource can be stored in cache.
2014-10-27Cache: disable caching of responses with Vary (ticket #118).Maxim Dounin2-0/+32
The "proxy_ignore_header" directive now undersands the "Vary" parameter to ignore the header as needed.
2014-10-15Gzip, gunzip: flush busy buffers if any.Maxim Dounin2-4/+16
Previous code resulted in transfer stalls when client happened to read all the data in buffers at once, while all gzip buffers were exhausted (but ctx->nomem wasn't set). Make sure to call next body filter at least once per call if there are busy buffers. Additionally, handling of calls with NULL chain was changed to follow the same logic, i.e., next body filter is only called with NULL chain if there are busy buffers. This is expected to fix "output chain is empty" alerts as reported by some users after c52a761a2029 (1.5.7).
2014-10-14Style.Maxim Dounin1-1/+2
2014-10-14Upstream: proxy_force_ranges and friends.Roman Arutyunyan6-0/+60
The directives enable byte ranges for both cached and uncached responses regardless of backend headers.
2014-10-11Win32: suppressed warnings by "-Werror=sign-compare".Kouhei Sutou1-2/+2
2014-10-11Win32: fixed wrong type cast.Kouhei Sutou1-1/+1
GetQueuedCompletionStatus() document on MSDN says the following signature: http://msdn.microsoft.com/en-us/library/windows/desktop/aa364986.aspx BOOL WINAPI GetQueuedCompletionStatus( _In_ HANDLE CompletionPort, _Out_ LPDWORD lpNumberOfBytes, _Out_ PULONG_PTR lpCompletionKey, _Out_ LPOVERLAPPED *lpOverlapped, _In_ DWORD dwMilliseconds ); In the latest specification, the type of the third argument (lpCompletionKey) is PULONG_PTR not LPDWORD.
2014-10-08Fixed possible buffer overrun in "too long header line" logging.Maxim Dounin1-3/+2
Additionally, ellipsis now always added to make it clear that the header logged is incomplete. Reported by Daniil Bondarev.
2014-10-02Core: fixed buffer overrun when hash max_size reached.Yichun Zhang1-0/+2
2014-10-01Upstream: fix $upstream_cache_last_modified variable.Piotr Sikora1-0/+3
Due to the u->headers_in.last_modified_time not being correctly initialized, this variable was evaluated to "Thu, 01 Jan 1970 00:00:00 GMT" for responses cached without the "Last-Modified" header which resulted in subsequent proxy requests being sent with "If-Modified-Since: Thu, 01 Jan 1970 00:00:00 GMT" header. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-08-27Fixed counting of sent bytes in the send chain functions on EINTR.Valentin Bartenev5-0/+5
Previously, a value of the "send" variable wasn't properly adjusted in a rare case when syscall was interrupted by a signal. As a result, these functions could send less data than the limit allows.
2014-10-02Version bump.Valentin Bartenev1-2/+2
2014-09-29Upstream keepalive: reset c->sent on cached connections.Maxim Dounin1-0/+1
The c->sent is reset to 0 on each request by server-side http code, so do the same on client side. This allows to count number of bytes sent in a particular request.
2014-09-24Limit req: reduced number of parameters in the lookup function.Valentin Bartenev1-8/+7
No functional changes.
2014-09-24Limit req: use complex value in limit_req_zone.Valentin Bartenev1-60/+47
One intentional side effect of this change is that key is allowed only in the first position. Previously, it was possible to specify the key variable at any position, but that was never documented, and is contrary with nginx configuration practice for positional parameters.
2014-09-24Limit conn: aligned field names in structures.Valentin Bartenev1-11/+11
No functional changes.
2014-09-24Limit conn: use complex value in limit_conn_zone (ticket #121).Valentin Bartenev1-67/+54
One intentional side effect of this change is that key is allowed only in the first position. Previously, it was possible to specify the key variable at any position, but that was never documented, and is contrary to nginx configuration practice for positional parameters.
2014-09-24Limit conn: removed deprecated "limit_zone" directive.Valentin Bartenev1-84/+0
It's deprecated since 260d591cb6a3 (1.1.8). The "limit_conn_zone" directive should be used instead.
2014-08-26Syslog: improved error handling of unix domain sockets.Vladimir Homutov1-2/+24
If a syslog daemon is restarted and the unix socket is used, further logging might stop to work. In case of send error, socket is closed, forcing a reconnection at the next logging attempt.
2014-09-01Syslog: enabled logging of send errors.Vladimir Homutov2-5/+10
The ngx_cycle->log is used when sending the message. This allows to log syslog send errors in another log. Logging to syslog after its cleanup handler has been executed was prohibited. Previously, this was possible from ngx_destroy_pool(), which resulted in error messages caused by attempts to write into the closed socket. The "processing" flag is renamed to "busy" to better match its semantics.
2014-09-17Avoided to add duplicate hash key in ngx_http_types_slot().Gu Feng1-1/+5
2014-09-22Removed duplicate initialization of the "rev" variable.Valentin Bartenev1-2/+0
2014-08-13Generalized definitions of the number of preallocated iovec's.Valentin Bartenev7-57/+24
No functional changes.
2014-08-13Reduced difference between the send chain functions.Valentin Bartenev2-15/+11
No functional changes. This follows the change from ad137a80919f.
2014-08-13Merged implementations of ngx_readv_chain().Valentin Bartenev1-97/+9
There's no real need in two separate implementations, with and without kqueue support.
2014-08-13Removed the "complete" variable from various send chain functions.Valentin Bartenev6-42/+11
It was made redundant by the previous change, since the "sent" variable is no longer modified.
2014-08-13Moved the code for adjusting sent buffers in a separate function.Valentin Bartenev8-212/+54
2014-08-13Fixed writev() debug log message in ngx_darwin_sendfile_chain().Valentin Bartenev1-1/+1