summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_request.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-10-23ngx_http_keepalive_handler() is now trying to not keep c->buffer's memory forValentin Bartenev1-0/+14
idle connections. This behaviour is consistent with the ngx_http_set_keepalive() function and it should decrease memory usage in some cases (especially if epoll/rtsig is used).
2012-10-03SSL: the "ssl_verify_client" directive parameter "optional_no_ca".Maxim Dounin1-1/+3
This parameter allows to don't require certificate to be signed by a trusted CA, e.g. if CA certificate isn't known in advance, like in WebID protocol. Note that it doesn't add any security unless the certificate is actually checked to be trusted by some external means (e.g. by a backend). Patch by Mike Kazantsev, Eric O'Connor.
2012-07-30ngx_http_find_virtual_server() should return NGX_DECLINED if virtual server notValentin Bartenev1-1/+1
found.
2012-07-07Entity tags: basic support in not modified filter.Maxim Dounin1-0/+8
This includes handling of ETag headers (if present in a response) with basic support for If-Match, If-None-Match conditionals in not modified filter. Note that the "r->headers_out.last_modified_time == -1" check in the not modified filter is left as is intentionally. It's to prevent handling of If-* headers in case of proxy without cache (much like currently done with If-Modified-Since).
2012-07-06Corrected $request_length calculation for pipelined requests.Andrey Belov1-7/+4
2012-06-21Fixed compile-time conditionals used to detect if X-Forwarded-For supportRuslan Ermilov1-1/+1
is needed.
2012-06-05Win32: uris with ":$" are now rejected.Maxim Dounin1-6/+22
There are too many problems with special NTFS streams, notably "::$data", "::$index_allocation" and ":$i30:$index_allocation". For now we don't reject all URIs with ":" like Apache does as there are no good reasons seen yet, and there are multiple programs using it in URLs (e.g. MediaWiki).
2012-05-17Fixed segfault with filter_finalize introduced in r4621 (1.3.0).Maxim Dounin1-2/+0
Example configuration to reproduce: location /image/ { error_page 415 = /zero; image_filter crop 100 100; proxy_pass http://127.0.0.1:8080; proxy_store on; } location /zero { return 204; } The problem appeared if upstream returned (big enough) non-image file, causing 415 to be generated by image filter.
2012-05-14Fixed possible request hang with filter finalization.Maxim Dounin1-0/+1
With r->filter_finalize set the ngx_http_finalize_connection() wasn't called from ngx_http_finalize_request() called with NGX_OK, resulting in r->main->count not being decremented, thus causing request hang in some rare situations. See here for more details: http://mailman.nginx.org/pipermail/nginx-devel/2012-May/002190.html Patch by Yichun Zhang (agentzh).
2012-04-27Removed surplus condition.Valentin Bartenev1-8/+4
2012-04-16Fixed log->action after ssl handshake.Maxim Dounin1-0/+2
2012-04-12Fixed grammar in error messages.Ruslan Ermilov1-2/+2
2012-03-22Restricted keepalive_disable safari to OS X only.Maxim Dounin1-1/+3
The problem doesn't affect non-Apple systems for sure, and many pretend to be Safari now. Prodded by Piotr Sikora.
2012-02-13Core: protection from cycles with named locations and post_action.Maxim Dounin1-0/+4
Now redirects to named locations are counted against normal uri changes limit, and post_action respects this limit as well. As a result at least the following (bad) configurations no longer trigger infinite cycles: 1. Post action which recursively triggers post action: location / { post_action /index.html; } 2. Post action pointing to nonexistent named location: location / { post_action @nonexistent; } 3. Recursive error page for 500 (Internal Server Error) pointing to a nonexistent named location: location / { recursive_error_pages on; error_page 500 @nonexistent; return 500; }
2012-02-13Core: protection from subrequest loops.Maxim Dounin1-0/+1
Without the protection, subrequest loop results in r->count overflow and SIGSEGV. Protection was broken in 0.7.25. Note that this also limits number of parallel subrequests. This wasn't exactly the case before 0.7.25 as local subrequests were completed directly. See here for details: http://nginx.org/pipermail/nginx-ru/2010-February/032184.html
2012-01-18Copyright updated.Maxim Konovalov1-0/+1
2011-11-28Added support for IP-literal in the Host header and request line (ticket #1).Valentin Bartenev1-24/+53
Additional parsing logic added to correctly handle RFC 3986 compliant IPv6 and IPvFuture characters enclosed in square brackets. The host validation was completely rewritten. The behavior for non IP literals was changed in a more proper and safer way: - Host part is now delimited either by the first colon or by the end of string if there's no colon. Previously the last colon was used as delimiter which allowed substitution of a port number in the $host variable. (e.g. Host: 127.0.0.1:9000:80) - Fixed stripping of the ending dot in the Host header when the host was also followed by a port number. (e.g. Host: nginx.com.:80) - Fixed upper case characters detection. Previously it was broken which led to wasting memory and CPU.
2011-11-22Fixed segfault on ssl servers without cert with SNI (ticket #54).Maxim Dounin1-12/+14
Non-default servers may not have ssl context created if there are no certificate defined. Make sure to check if ssl context present before using it.
2011-10-11Fix for socket leak with "aio sendfile" and "limit_rate".Maxim Dounin1-8/+8
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-08-23Better handling of various per-server ssl options with SNI.Maxim Dounin1-0/+18
SSL_set_SSL_CTX() doesn't touch values cached within ssl connection structure, it only changes certificates (at least as of now, OpenSSL 1.0.0d and earlier). As a result settings like ssl_verify_client, ssl_verify_depth, ssl_prefer_server_ciphers are only configurable on per-socket basis while with SNI it should be possible to specify them different for two servers listening on the same socket. Workaround is to explicitly re-apply settings we care about from context to ssl connection in servername callback. Note that SSL_clear_options() is only available in OpenSSL 0.9.8m+. I.e. with older versions it is not possible to clear ssl_prefer_server_ciphers option if it's set in default server for a socket.
2011-08-01always set timer in discard body handler, this fixes the casesIgor Sysoev1-1/+1
when request for static file is redirected by error_page to an SSI page patch by Maxim Dounin
2011-08-01lingering_close "off|on|always"Igor Sysoev1-4/+6
patch by Maxim Dounin
2011-08-01do not send RST on normal lingering close read timeout,Igor Sysoev1-1/+0
if reset_timedout_connection is on patch by Maxim Dounin
2011-08-01enable lingering close for pipelined requestsIgor Sysoev1-1/+5
patch by Maxim Dounin
2011-07-30Accept-Encoding refactoring: remove ancient MSIE 4.x test for gzipIgor Sysoev1-3/+0
2011-04-04reuse keepalive connections if there are no free worker connectionsIgor Sysoev1-0/+2
patch by Maxim Dounin
2011-01-20introduce 494 code "Request Header Too Large"Igor Sysoev1-2/+7
2010-12-06"If-Unmodified-Since" supportIgor Sysoev1-0/+4
2010-07-05fix recognition of SSLv2 Client Hello Packet large than 255 bytesIgor Sysoev1-1/+1
2010-06-15allow spaces in URIIgor Sysoev1-0/+1
2010-06-04test default NTFS stream "::$DATA"Igor Sysoev1-4/+19
2010-02-01disable keepalive for Safari:Igor Sysoev1-0/+3
https://bugs.webkit.org/show_bug.cgi?id=5760
2010-01-28skip URI trailing spaces under Win32Igor Sysoev1-2/+4
2010-01-28Fix segfault when while discarding body a write event handler is called,Igor Sysoev1-0/+1
runs ngx_http_core_run_phases(), and starts a request processing again. The write event has clear type and remained in a keepalive connection. The bug was introduced in r3050.
2009-11-16regex named capturesIgor Sysoev1-29/+6
2009-11-12r->chromeIgor Sysoev1-0/+3
2009-11-03fix segfault if there is single large_client_header_buffersIgor Sysoev1-1/+9
and a request line fills it completely
2009-10-22do not run regex for empty host name since regex always fails in this case,Igor Sysoev1-1/+1
the bug had been introduced in r2196
2009-10-21rename core_srv_conf fields to more understandable default_server and serverIgor Sysoev1-3/+3
2009-10-21fix r3218:Igor Sysoev1-1/+1
Initially building lists of ports, addresses, and server names had been placed at final configuration stage, because complete set of the "listen"s and the "server_names" were required for this operation. r3218 broke it, because the "listen"s go usually first in configuration, and cscf->server_names is empty at this stage, therefore no virtual names were configured. Now server configurations are stored in array for each address:port to configure virtual names. Also regex captures flag is moved from server names to core server configuration.
2009-10-20fix two previous commits: an early parallel body discarding completionIgor Sysoev1-1/+2
disables incomplete ngx_http_writer()
2009-10-19allow discarding body while a long response transferIgor Sysoev1-1/+3
2009-10-19restore discard body handler after ngx_http_set_writer() set it toIgor Sysoev1-3/+8
ngx_http_test_reading(), the bug was introduced in r3050
2009-10-19add lingering timeout if a response is short and a request body is beingIgor Sysoev1-2/+9
discarded, the bug was introduced in r3050
2009-10-02clear r->keepalive to disable preventively callingIgor Sysoev1-0/+2
ngx_http_set_keepalive() while request cleanup
2009-09-30log 499 instead 0, the bug was introduced in r3050Igor Sysoev1-0/+4
2009-09-24update the previous commit: use ngx_strlow()Igor Sysoev1-8/+4
2009-09-24$host is always in low case:Igor Sysoev1-45/+65
*) move low case convertation from ngx_http_find_virtual_server() to ngx_http_validate_host() *) add in ngx_http_validate_host() capability to copy host name in the pool allocated memory
2009-09-21fix request counter for post_action, the bug was introduced in r3050Igor Sysoev1-0/+2