summaryrefslogtreecommitdiffhomepage
path: root/src/http (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-06-16Upstream: fixed shared upstreams on win32.Ruslan Ermilov2-12/+32
2015-06-16Disabled duplicate http, mail, and stream blocks.Vladimir Homutov1-0/+4
Such configurations have very limited use, introduce various problems and are not officially supported.
2015-06-16Core: renamed ngx_proxy_protocol_parse to ngx_proxy_protocol_read.Roman Arutyunyan2-3/+3
The new name is consistent with the ngx_proxy_protocol_write function.
2015-06-11Moved ngx_http_parse_time() to core, renamed accordingly.Maxim Dounin8-290/+10
The function is now called ngx_parse_http_time(), and can be used by any code to parse HTTP-style date and time. In particular, it will be used for OCSP stapling. For compatibility, a macro to map ngx_http_parse_time() to the new name provided for a while.
2015-06-11Removed unused ngx_http_get_time() declaration.Maxim Dounin1-2/+0
2015-06-04Upstream keepalive: reduced diffs to the plus version of nginx.Roman Arutyunyan1-39/+42
2015-05-25Disabled SSLv3 by default (ticket #653).Maxim Dounin3-7/+5
2015-05-20Upstream: report to error_log when max_fails is reached.Ruslan Ermilov1-0/+5
This can be useful to understand why "no live upstreams" happens, in particular.
2015-05-20The "reuseport" option of the "listen" directive.Maxim Dounin3-0/+24
When configured, an individual listen socket on a given address is created for each worker process. This allows to reduce in-kernel lock contention on configurations with high accept rates, resulting in better performance. As of now it works on Linux and DragonFly BSD. Note that on Linux incoming connection requests are currently tied up to a specific listen socket, and if some sockets are closed, connection requests will be reset, see https://lwn.net/Articles/542629/. With nginx, this may happen if the number of worker processes is reduced. There is no such problem on DragonFly BSD. Based on previous work by Sepherosa Ziehau and Yingqi Lu.
2015-05-20Simplified ngx_http_init_listening().Maxim Dounin1-7/+1
There is no need to set "i" to 0, as it's expected to be 0 assuming the bindings are properly sorted, and we already rely on this when explicitly set hport->naddrs to 1. Remaining conditional code is replaced with identical "hport->naddrs = i + 1". Identical modifications are done in the mail and stream modules, in the ngx_mail_optimize_servers() and ngx_stream_optimize_servers() functions, respectively. No functional changes.
2015-05-18Upstream hash: consistency across little/big endianness.Sergey Kandaurov1-4/+15
2015-05-16Upstream: $upstream_connect_time.Ruslan Ermilov2-1/+14
The variable keeps time spent on establishing a connection with the upstream server.
2015-05-16Upstream: times to obtain header/response are stored as ngx_msec_t.Ruslan Ermilov2-30/+13
2015-04-29Removed deprecated HTTP directives.Ruslan Ermilov1-33/+0
2015-04-25Core: the ngx_set_connection_log() macro.Vladimir Homutov3-15/+4
The http and stream versions of this macro were identical.
2015-04-24Merge proxy_protocol setting of listen directives.Roman Arutyunyan1-1/+4
It's now enough to specify proxy_protocol option in one listen directive to enable it in all servers listening on the same address/port. Previously, the setting from the first directive was always used.
2015-04-23Removed the obsolete rtsig module.Ruslan Ermilov1-1/+1
2015-04-22Removed the obsolete aio module.Ruslan Ermilov2-2/+2
2015-04-22Upstream: allow multiple upstreams to use the same shared zone.Ruslan Ermilov1-42/+56
2015-04-21Memcached: enabled ranges.Martin Mlynář1-0/+1
2015-04-21Upstream: simplified ip_hash and hash peer selection code.Ruslan Ermilov2-44/+16
Now that peers are stored as a list, the weighted and unweighted cases became nearly identical.
2015-04-20Limit req: removed check for unknown limit_req_zone.Sergey Kandaurov1-7/+0
With 48b3d5ddfb03, it's possible to specify limit_req_zone after limit_req.
2015-04-19Upstream: fixed unlocked access to peer->conns.Ruslan Ermilov1-3/+6
2015-04-16Upstream: get rid of questionable micro-optimization in ip_hash.Ruslan Ermilov1-7/+2
If a peer was initially skipped due to max_fails, there's no reason not to try it again if enough time has passed, and the next_upstream logic is in action. This also reduces diffs with NGINX Plus.
2015-04-14Upstream: the "zone" directive.Ruslan Ermilov4-6/+380
Upstreams with the "zone" directive are kept in shared memory, with a consistent view of all worker processes.
2015-04-14Upstreams: locking.Ruslan Ermilov5-29/+50
2015-04-10Upstream: store peers as a linked list.Ruslan Ermilov5-86/+139
This is an API change.
2015-04-10Upstream: track the number of active connections to upstreams.Ruslan Ermilov5-122/+35
This also simplifies the implementation of the least_conn module.
2015-04-07Upstream: abbreviated SSL handshake may interact badly with Nagle.Ruslan Ermilov1-1/+25
2015-04-06Request body: always flush buffers if request buffering is off.Valentin Bartenev1-0/+2
This fixes unbuffered proxying to SSL backends, since it prevents ngx_ssl_send_chain() from accumulation of request body in the SSL buffer.
2015-04-01Cache: added support for reading of the header in thread pools.Valentin Bartenev2-19/+109
2015-03-31Fixed invalid access to complex value defined as an empty string.Sergey Kandaurov2-5/+5
Found by Valgrind.
2015-03-23SPDY: always push pending data.Valentin Bartenev1-51/+40
This helps to avoid suboptimal behavior when a client waits for a control frame or more data to increase window size, but the frames have been delayed in the socket buffer. The delays can be caused by bad interaction between Nagle's algorithm on nginx side and delayed ACK on the client side or by TCP_CORK/TCP_NOPUSH if SPDY was working without SSL and sendfile() was used. The pushing code is now very similar to ngx_http_set_keepalive().
2015-03-23SPDY: fixed error handling in ngx_http_spdy_send_output_queue().Valentin Bartenev1-8/+12
2015-03-26Proxy: fixed proxy_request_buffering and chunked with preread body.Maxim Dounin1-3/+4
If any preread body bytes were sent in the first chain, chunk size was incorrectly added before the whole chain, including header, resulting in an invalid request sent to upstream. Fixed to properly add chunk size after the header.
2015-03-23Upstream: uwsgi_request_buffering, scgi_request_buffering.Maxim Dounin2-2/+44
2015-03-23FastCGI: fastcgi_request_buffering.Maxim Dounin1-18/+342
2015-03-23Proxy: proxy_request_buffering chunked support.Maxim Dounin1-6/+216
2015-03-23Request body: unbuffered reading.Maxim Dounin8-25/+306
The r->request_body_no_buffering flag was introduced. It instructs client request body reading code to avoid reading the whole body, and to call post_handler early instead. The caller should use the ngx_http_read_unbuffered_request_body() function to read remaining parts of the body. Upstream module is now able to use this mode, if configured with the proxy_request_buffering directive.
2015-03-23Request body: filters support.Maxim Dounin5-8/+22
2015-03-23Request body: moved request body writing to save filter.Maxim Dounin1-14/+8
2015-03-23Request body: free chain links in ngx_http_write_request_body().Maxim Dounin1-2/+7
2015-03-23Format specifier fixed for file size of buffers.Maxim Dounin2-5/+5
2015-03-23Proxy: fixed proxy_set_body with proxy_cache.Maxim Dounin1-0/+1
If the last header evaluation resulted in an empty header, the e.skip flag was set and was not reset when we've switched to evaluation of body_values. This incorrectly resulted in body values being skipped instead of producing some correct body as set by proxy_set_body. Fix is to properly reset the e.skip flag. As the problem only appeared if the last potentially non-empty header happened to be empty, it only manifested itself if proxy_set_body was used with proxy_cache.
2015-03-23Removed stub implementation of win32 mutexes.Ruslan Ermilov1-2/+0
2015-03-23SSL: avoid SSL_CTX_set_tmp_rsa_callback() call with LibreSSL.Maxim Dounin1-0/+2
LibreSSL removed support for export ciphers and a call to SSL_CTX_set_tmp_rsa_callback() results in an error left in the error queue. This caused alerts "ignoring stale global SSL error (...called a function you should not call) while SSL handshaking" on a first connection in each worker process.
2015-03-20Removed busy locks.Ruslan Ermilov3-362/+0
2015-03-20Removed ngx_connection_t.lock.Ruslan Ermilov1-3/+0
2015-03-15SPDY: fixed format specifier in logging.Xiaochen Wang1-1/+1
2015-03-14Added support for offloading read() in thread pools.Valentin Bartenev4-3/+159