summaryrefslogtreecommitdiffhomepage
path: root/src/http (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-12-10SPDY: drop the "delayed" flag when finalizing connection.Valentin Bartenev1-0/+2
This flag in SPDY fake write events serves the same purposes as the "ready" flag in real events, and it must be dropped if request needs to be handled. Otherwise, it can prevent the request from finalization if ngx_http_writer() was set, which results in a connection leak. Found by Xiaochen Wang.
2013-12-09Fixed handling of UNIX-domain sockets.Ruslan Ermilov1-0/+12
When evaluating $local_port, $server_port, and $server_addr, UNIX-domain sockets were mistakenly interpreted as IPv4 sockets.
2013-12-06Fixed incorrect ngx_str_set() usage, broken in c82b2e020b9f.Piotr Sikora1-1/+1
Found by Coverity Scan CID 1135525. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2013-12-04Fixed build without SSL, broken by c82b2e020b9f.Maxim Dounin1-3/+3
2013-12-04SSL support in the uwsgi module.Maxim Dounin1-7/+197
Based on patch by Roberto De Ioris.
2013-12-03Added support for TCP_FASTOPEN supported in Linux >= 3.7.1.Mathew Rodley3-0/+30
--- auto/unix | 12 ++++++++++++ src/core/ngx_connection.c | 32 ++++++++++++++++++++++++++++++++ src/core/ngx_connection.h | 4 ++++ src/http/ngx_http.c | 4 ++++ src/http/ngx_http_core_module.c | 21 +++++++++++++++++++++ src/http/ngx_http_core_module.h | 3 +++ 6 files changed, 76 insertions(+)
2013-12-03Fixed "setfib=" on non-first listening socket.Maxim Dounin1-0/+2
2013-12-03Improved code readablity in ngx_http_upstream_init_round_robin().Vladimir Homutov1-3/+3
Changed initialization order of the peer structure in one of the cases to be in line with the rest. No functional changes.
2013-12-03Fixed null pointer dereference with $upstream_cache_last_modified.Ruslan Ermilov1-1/+2
2013-11-29Upstream: skip empty cache headers.Maxim Dounin3-3/+3
Notably this fixes HTTP_IF_MODIFIED_SINCE which was always sent with cache enabled in fastcgi/scgi/uwsgi after 43ccaf8e8728.
2013-11-19Proper backtracking after space in a request line.Ruslan Ermilov1-0/+2
2013-11-18Upstream: cache revalidation with conditional requests.Maxim Dounin8-6/+254
The following new directives are introduced: proxy_cache_revalidate, fastcgi_cache_revalidate, scgi_cache_revalidate, uwsgi_cache_revalidate. Default is off. When set to on, they enable cache revalidation using conditional requests with If-Modified-Since for expired cache items. As of now, no attempts are made to merge headers given in a 304 response during cache revalidation with headers previously stored in a cache item. Headers in a 304 response are only used to calculate new validity time of a cache item.
2013-11-11SPDY: fixed request hang with the auth request module.Valentin Bartenev1-1/+1
We should just call post_handler() when subrequest wants to read body, like it happens for HTTP since rev. f458156fd46a. An attempt to init request body for subrequests results in hang if the body was not already read.
2013-10-31Gunzip: proper error handling on gunzipping an empty response.Maxim Dounin1-3/+7
With previous code, an empty (malformed) response resulted in a request finalized without sending anything to a client.
2013-10-31Gunzip: "error" logging level on inflate() errors.Maxim Dounin1-1/+1
Errors can easily happen due to broken upstream responses, there is no need to log them at "alert" level.
2013-10-31Removed extra allocation for $sent_http_last_modified.Maxim Dounin1-2/+1
There is no need to allocate memory for "Last-Modified: " string, the variable only contains date itself.
2013-10-31Auth basic: "info" logging level on no user/password.Maxim Dounin1-1/+1
This isn't an exceptional condition and normally happens on first request from a client.
2013-10-28Gzip, gunzip: flush pending data when incoming chain is NULL.Yichun Zhang2-2/+2
2013-10-21Upstream: optimize loops in ngx_http_upstream_init_round_robin().Xiaochen Wang1-8/+8
2013-10-18Fixed "satisfy any" if 403 is returned after 401 (ticket #285).Maxim Dounin1-1/+3
The 403 (Forbidden) should not overwrite 401 (Unauthorized) as the latter should be returned with the WWW-Authenticate header to request authentication by a client. The problem could be triggered with 3rd party modules and the "deny" directive, or with auth_basic and auth_request which returns 403 (in 1.5.4+). Patch by Jan Marc Hoffmann.
2013-10-18Headers filter: empty Cache-Control is no longer added.Maxim Dounin1-0/+4
Much like with other headers, "add_header Cache-Control $value;" no longer results in anything added to response headers if $value evaluates to an empty string.
2013-10-18Style.Maxim Dounin1-1/+1
2013-10-11SSL: added ability to set keys used for Session Tickets (RFC5077).Piotr Sikora2-0/+19
In order to support key rollover, ssl_session_ticket_key can be defined multiple times. The first key will be used to issue and resume Session Tickets, while the rest will be used only to resume them. ssl_session_ticket_key session_tickets/current.key; ssl_session_ticket_key session_tickets/prev-1h.key; ssl_session_ticket_key session_tickets/prev-2h.key; Please note that nginx supports Session Tickets even without explicit configuration of the keys and this feature should be only used in setups where SSL traffic is distributed across multiple nginx servers. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2013-10-02Limit req: fixed "nodelay" parsing.Maxim Dounin1-1/+1
Previously arguments starting with "nodelay" were considered valid, e.g. "limit_req ... nodelayFOO;".
2013-10-02Upstream: fixed "down" and "backup" parsing.Maxim Dounin1-2/+2
Previously arguments starting with "down" or "backup" were considered valid, e.g. "server ... downFOO;".
2013-10-02Unused macro and variable removed.Sergey Kandaurov1-2/+0
The macro NGX_HTTP_DAV_COPY_BLOCK is not used since 8101d9101ed8 (0.8.9). The variable ngx_accept_mutex_lock_file was never used.
2013-10-01SPDY: ignore priority when queuing blocked frames.Valentin Bartenev1-2/+2
With this change all such frames will be added in front of the output queue, and will be sent first. It prevents HOL blocking when response with higher priority is blocked by response with lower priority in the middle of the queue because the order of their SYN_REPLY frames cannot be changed. Proposed by Yury Kirpichev.
2013-10-01SPDY: set empty write handler during connection finalization.Valentin Bartenev1-0/+1
While ngx_http_spdy_write_handler() should not make any harm with current code, calling it during finalization of SPDY connection was not intended.
2013-10-01SPDY: fixed connection leak while waiting for request headers.Valentin Bartenev1-1/+19
If an error occurs in a SPDY connection, the c->error flag is set on every fake request connection, and its read or write event handler is called, in order to finalize it. But while waiting for request headers, it was a no-op since the read event handler had been set to ngx_http_empty_handler().
2013-10-01SPDY: fixed connection leak while waiting for request body.Valentin Bartenev1-0/+4
If an error occurs in a SPDY connection, the c->error flag is set on every fake request connection, and its read or write event handler is called, in order to finalize it. But while waiting for a request body, it was a no-op since the read event handler ngx_http_request_handler() calls r->read_event_handler that had been set to ngx_http_block_reading().
2013-09-27FastCGI: non-buffered mode support.Maxim Dounin1-8/+230
2013-09-27Upstream: subrequest_in_memory support for SCGI and uwsgi enabled.Maxim Dounin2-14/+0
This was missed in 9d59a8eda373 when non-buffered support was added to SCGI and uwsgi.
2013-09-27Upstream: subrequest_in_memory fix.Maxim Dounin1-4/+6
With previous code only part of u->buffer might be emptied in case of special responses, resulting in partial responses seen by SSI set in case of simple protocols, or spurious errors like "upstream sent invalid chunked response" in case of complex ones.
2013-09-27Upstream: proxy_no_cache, fastcgi_no_cache warnings removed.Maxim Dounin2-12/+0
2013-09-23Proxy: added the "proxy_ssl_ciphers" directive.Piotr Sikora1-0/+22
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2013-09-23Caseless location tree construction (ticket #90).Maxim Dounin2-6/+9
Location tree was always constructed using case-sensitive comparison, even on case-insensitive systems. This resulted in incorrect operation if uppercase letters were used in location directives. Notably, the following config: location /a { ... } location /B { ... } failed to properly map requests to "/B" into "location /B".
2013-09-22SSL: stop loading configs with invalid "ssl_ciphers" values.Piotr Sikora1-0/+1
While there, remove unnecessary check in ngx_mail_ssl_module. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2013-09-19Proxy: added the "proxy_ssl_protocols" directive.Andrei Belov1-10/+40
2013-09-18Fixed response line formatting with empty reason phrase.Sergey Kandaurov1-3/+3
As per RFC 2616 sec 6.1 the response status code is always followed by SP.
2013-09-16Use EPOLLRDHUP in ngx_http_test_reading() (ticket #320).Valentin Bartenev1-0/+27
This allows to detect client connection close with pending data when the ngx_http_test_reading() request event handler is set.
2013-09-16Upstream: use EPOLLRDHUP to check broken connections (ticket #320).Valentin Bartenev1-0/+49
This allows to detect client connection close with pending data on Linux while processing upstream.
2013-09-03Return reason phrase for 414.Valentin Bartenev1-4/+1
After 62be77b0608f nginx can return this code.
2013-09-04Upstream: fixed $upstream_response_time format specifiers.Maxim Dounin1-1/+1
2013-09-04Fixed incorrect response line on "return 203".Maxim Dounin1-0/+6
Reported by Weibin Yao, http://mailman.nginx.org/pipermail/nginx-devel/2013-April/003607.html.
2013-09-04Request cleanup code unified, no functional changes.Maxim Dounin1-1/+6
Additionally, detaching a cleanup chain from a request is a bit more resilent to various bugs if any.
2013-09-04Handling of ngx_int_t != intptr_t case.Maxim Dounin2-5/+5
Casts between pointers and integers produce warnings on size mismatch. To silence them, cast to (u)intptr_t should be used. Prevoiusly, casts to ngx_(u)int_t were used in some cases, and several ngx_int_t expressions had no casts. As of now it's mostly style as ngx_int_t is defined as intptr_t.
2013-09-04Win32: $request_time fixed.Maxim Dounin2-2/+2
On win32, time_t is 64 bits wide by default, and passing an ngx_msec_int_t argument for %T format specifier doesn't work. This doesn't manifest itself on other platforms as time_t and ngx_msec_int_t are usually of the same size.
2013-09-04Win32: Borland C compatibility fixes.Maxim Dounin6-12/+16
Several false positive warnings silenced, notably W8012 "Comparing signed and unsigned" (due to u_short values promoted to int), and W8072 "Suspicious pointer arithmetic" (due to large type values added to pointers). With this patch, it's now again possible to compile nginx using bcc32, with options we normally compile on win32 minus ipv6 and ssl.
2013-09-04Win32: Open Watcom C compatibility fixes.Maxim Dounin1-1/+1
Precompiled headers are disabled as they lead to internal compiler errors with long configure lines. Couple of false positive warnings silenced. Various win32 typedefs are adjusted to work with Open Watcom C 1.9 headers. With this patch, it's now again possible to compile nginx using owc386, with options we normally compile on win32 minus ipv6 and ssl.
2013-09-02Assume the HTTP/1.0 version by default.Valentin Bartenev1-0/+1
It is believed to be better than fallback to HTTP/0.9, because most of the clients at present time support HTTP/1.0. It allows nginx to return error response code for them in cases when it fail to parse request line, and therefore fail to detect client protocol version. Even if the client does not support HTTP/1.0, this assumption should not cause any harm, since from the HTTP/0.9 point of view it still a valid response.