summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2011-10-15Added clearing of modules' contexts in ngx_http_named_location().Maxim Dounin1-0/+3
Patch by Yichun Zhang (agentzh).
2011-10-13Fixed utf8 decode (ticket #25).Maxim Dounin1-3/+3
Patch by Alexey Kuts.
2011-10-13Skipping location rewrite phase for server null location.Igor Sysoev1-0/+12
2011-10-12Better recheck of dead upstream servers.Maxim Dounin3-8/+18
Previously nginx used to mark backend again as live as soon as fail_timeout passes (10s by default) since last failure. On the other hand, detecting dead backend takes up to 60s (proxy_connect_timeout) in typical situation "backend is down and doesn't respond to any packets". This resulted in suboptimal behaviour in the above situation (up to 23% of requests were directed to dead backend with default settings). More detailed description of the problem may be found here (in Russian): http://mailman.nginx.org/pipermail/nginx-ru/2011-August/042172.html Fix is to only allow one request after fail_timeout passes, and mark backend as "live" only if this request succeeds. Note that with new code backend will not be marked "live" unless "check" request is completed, and this may take a while in some specific workloads (e.g. streaming). This is believed to be acceptable.
2011-10-12Clear old Location header (if any) while adding a new one.Maxim Dounin5-0/+17
This prevents incorrect behaviour when another redirect is issued within error_page 302 handler.
2011-10-12Wording fix, "many data" is incorrect.Maxim Dounin1-1/+1
Noted by Piotr Sikora.
2011-10-12Fixed two minor bugs in "types" parsing code.Ruslan Ermilov1-1/+10
2011-10-12Fixed grammar in a comment.Ruslan Ermilov1-1/+1
2011-10-12Replaced magic constants representing default values of some directivesRuslan Ermilov1-4/+5
with appropriate #define's.
2011-10-12Stylistic change in checking the boolean expression.Ruslan Ermilov1-1/+1
2011-10-12Preallocating exact number of default MIME types entries.Igor Sysoev1-1/+1
2011-10-12Fixed configuration summary and manpage contents for the specialRuslan Ermilov1-3/+3
--error-log-path=stderr case.
2011-10-12Removed old warning that suggested to use "server_name_in_redirect off"Ruslan Ermilov1-7/+0
(now the default) in place of no longer supported "server_name *".
2011-10-11Additional headers for proxy/fastcgi/uwsgi/scgi_ignore_headers.Maxim Dounin2-6/+29
Now the following headers may be ignored as well: X-Accel-Limit-Rate, X-Accel-Buffering, X-Accel-Charset.
2011-10-11Handling of Content-Encoding set from perl.Maxim Dounin1-0/+7
This fixes double gzipping in case of gzip filter being enabled while perl returns already gzipped response.
2011-10-11Fix for socket leak with "aio sendfile" and "limit_rate".Maxim Dounin2-8/+13
Second aio post happened when timer set by limit_rate expired while we have aio request in flight, resulting in "second aio post" alert and socket leak. The patch adds actual protection from aio calls with r->aio already set to aio sendfile code in ngx_http_copy_filter(). This should fix other cases as well, e.g. when sending buffered to disk upstream replies while still talking to upstream. The ngx_http_writer() is also fixed to handle the above case (though it's mostly optimization now). Reported by Oleksandr V. Typlyns'kyi.
2011-10-11Fix for connection drops with AIO.Maxim Dounin1-1/+1
Connections serving content with AIO to fast clients were dropped with "client timed out" messages after send_timeout from response start.
2011-10-11Autoindex: escape html in file names.Maxim Dounin1-12/+49
2011-10-11Autoindex: escape '?' in file names.Maxim Dounin3-18/+31
For files with '?' in their names autoindex generated links with '?' not escaped. This resulted in effectively truncated links as '?' indicates query string start. This is an updated version of the patch originally posted at [1]. It introduces generic NGX_ESCAPE_URI_COMPONENT which escapes everything but unreserved characters as per RFC 3986. This approach also renders unneeded special colon processing (as colon is percent-encoded now), it's dropped accordingly. [1] http://nginx.org/pipermail/nginx-devel/2010-February/000112.html Reported by Konstantin Leonov.
2011-10-11Improved access log escaping to better protect other software.Maxim Dounin1-5/+5
Some character sets (notably ISO-8859-1) have C1 control characters in upper half, make sure to escape them. Reported by Jesus Olmos Gonzalez.
2011-10-11Fixing directive name in error message if types hash size is not enough.Igor Sysoev1-1/+1
2011-10-11Fixing mp4 module seeking on 32-bit platforms.Igor Sysoev1-1/+1
2011-10-10Fixed macro name.Ruslan Ermilov1-1/+1
2011-10-09The reference documentation is moving elsewhere.Ruslan Ermilov14-4772/+1
2011-10-07Releasing memory of idle SSL connection. This saves about 34K per SSLIgor Sysoev1-0/+4
connection. The SSL_MODE_RELEASE_BUFFERS option is available since OpenSSL 1.0.0d.
2011-10-07Disabling SSL compression. This saves about 300K per SSL connection.Igor Sysoev1-0/+4
The SSL_OP_NO_COMPRESSION option is available since OpenSSL 1.0.0.
2011-10-07Version bump.Igor Sysoev2-3/+3
2011-10-07Improved ngx_parse_time() code readability.Ruslan Ermilov2-24/+24
2011-10-07Tweaked error messages.Ruslan Ermilov1-5/+5
2011-10-06Adding repository path missed in r4179.Igor Sysoev1-0/+1
2011-10-05release-1.1.5 tagIgor Sysoev1-0/+1
2011-10-05nginx-1.1.5-RELEASErelease-1.1.5Igor Sysoev1-0/+81
2011-10-05Adding RELEASE procedure in GNUmakefile.Igor Sysoev1-0/+15
2011-10-05Version bump.Igor Sysoev2-3/+3
2011-10-05Fixed cache bypass caching of non-cacheable replies (ticket #21).Maxim Dounin1-4/+2
If cache was bypassed with proxy_cache_bypass, cache-controlling headers (Cache-Control, Expires) wasn't considered and response was cached even if it was actually non-cacheable. Patch by John Ferlito.
2011-09-30Added uwsgi_buffering and scgi_buffering directives.Maxim Dounin2-2/+20
Patch by Peter Smit.
2011-09-30Using strtod() instead of atofp() to support a lot of digits after dot inIgor Sysoev1-2/+9
"start" parameter value.
2011-09-29Fix of building on platforms with 32-bit off_t. (closed #23)Igor Sysoev1-9/+9
2011-09-27Fixed segmentation fault with empty config on Windows.Maxim Dounin1-3/+5
See here for report: http://mailman.nginx.org/pipermail/nginx-ru/2011-September/043288.html
2011-09-27Fix for "ssl_session_cache builtin" (broken since 1.1.1, r3993).Maxim Dounin2-4/+4
2011-09-27Better handling of late upstream creation.Maxim Dounin1-0/+4
Configuration with duplicate upstream blocks defined after first use, i.e. like server { ... location / { proxy_pass http://backend; } } upstream backend { ... } upstream backend { ... } now correctly results in "duplicate upstream" error. Additionally, upstream blocks defined after first use now handle various server directive parameters ("weight", "max_fails", etc.). Previously configuration like server { ... location / { proxy_pass http://backend; } } upstream backend { server 127.0.0.1 max_fails=5; } incorrectly resulted in "invalid parameter "max_fails=5"" error.
2011-09-27Cache: fix for sending of stale responses.Maxim Dounin1-1/+6
For normal cached responses ngx_http_cache_send() sends last buffer and then request finalized via ngx_http_finalize_request() call, i.e. everything is ok. But for stale responses (i.e. when upstream died, but we have something in cache) the same ngx_http_cache_send() sends last buffer, but then in ngx_http_upstream_finalize_request() another last buffer is send. This causes duplicate final chunk to appear if chunked encoding is used (and resulting problems with keepalive connections and so on). Fix this by not sending in ngx_http_upstream_finalize_request() another last buffer if we know response was from cache.
2011-09-27Cache: fix for sending of empty responses.Maxim Dounin1-3/+5
Revert wrong fix for empty responses introduced in 0.8.31 and apply new one, rewritten to match things done by static module as close as possible.
2011-09-27Incorrect special case for "return 204" removed.Maxim Dounin1-5/+0
The special case in question leads to replies without body in configuration like location / { error_page 404 /zero; return 404; } location /zero { return 204; } while replies with empty body are expected per protocol specs. Correct one will look like if (status == NGX_HTTP_NO_CONTENT) { rc = ngx_http_send_header(r); if (rc == NGX_ERROR || r->header_only) { return rc; } return ngx_http_send_special(r, NGX_HTTP_LAST); } though it looks like it's better to drop this special case at all.
2011-09-27Fix for "return 202" not discarding body.Maxim Dounin2-7/+4
Big POST (not fully preread) to a location / { return 202; } resulted in incorrect behaviour due to "return" code path not calling ngx_http_discard_request_body(). The same applies to all "return" used with 2xx/3xx codes except 201 and 204, and to all "return ... text" uses. Fix is to add ngx_http_discard_request_body() call to ngx_http_send_response() function where it looks appropriate. Discard body call from emtpy gif module removed as it's now redundant. Reported by Pyry Hakulinen, see http://mailman.nginx.org/pipermail/nginx/2011-August/028503.html
2011-09-27Fix for double content when return is used in error_page handler.Maxim Dounin1-2/+2
Test case: location / { error_page 405 /nope; return 405; } location /nope { return 200; } This is expected to return 405 with empty body, but in 0.8.42+ will return builtin 405 error page as well (though not counted in Content-Length, thus breaking protocol). Fix is to use status provided by rewrite script execution in case it's less than NGX_HTTP_BAD_REQUEST even if r->error_status set. This check is in line with one in ngx_http_script_return_code(). Note that this patch also changes behaviour for "return 302 ..." and "rewrite ... redirect" used as error handler. E.g. location / { error_page 405 /redirect; return 405; } location /redirect { rewrite ^ http://example.com/; } will actually return redirect to "http://example.com/" instead of builtin 405 error page with meaningless Location header. This looks like correct change and it's in line with what happens on e.g. directory redirects in error handlers.
2011-09-27Fix for incorrect 201 replies from dav module.Maxim Dounin1-3/+2
Replies with 201 code contain body, and we should clearly indicate it's empty if it's empty. Before 0.8.32 chunked was explicitly disabled for 201 replies and as a result empty body was indicated by connection close (not perfect, but worked). Since 0.8.32 chunked is enabled, and this causes incorrect responses from dav module when HTTP/1.1 is used: with "Transfer-Encoding: chunked" but no chunks at all. Fix is to actually return empty body in special response handler instead of abusing r->header_only flag. See here for initial report: http://mailman.nginx.org/pipermail/nginx-ru/2010-October/037535.html
2011-09-25Proxy: logging levels tuned, double logging fixed.Maxim Dounin1-6/+3
2011-09-25Proxy: whitespaces after chunk size allowed.Maxim Dounin1-0/+4
Whitespaces after chunk size seems to be be allowed by the "implied *LWS" rule and emitted by some servers.
2011-09-25Upstream: clearing of u->peer.connection on close.Maxim Dounin1-0/+1
This fixes crashes observed with some 3rd party balancer modules. Standard balancer modules (round-robin and ip hash) explicitly set pc->connection (aka u->peer.connection) to NULL and aren't affected.