summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2014-01-17Mail: fixed passing of IPv6 client address in XCLIENT.Ruslan Ermilov1-5/+28
2014-01-17Core: improved ngx_reset_pool() (ticket #490).Maxim Dounin1-2/+5
Previously pool->current wasn't moved back to pool, resulting in blocks not used for further allocations if pool->current was already moved at the time of ngx_reset_pool(). Additionally, to preserve logic of moving pool->current, the p->d.failed counters are now properly cleared. While here, pool->chain is also cleared. This change is essentially a nop with current code, but generally improves things.
2014-01-15SPDY: send output queue after processing of read event.Valentin Bartenev1-0/+5
During the processing of input some control frames can be added to the queue. And if there were no writing streams at the moment, these control frames might be left unsent for a long time (or even forever). This long delay is especially critical for PING replies since a client can consider connection as broken and then resend exactly the same request over a new connection, which is not safe in case of non-idempotent HTTP methods.
2014-01-15SPDY: the SETTINGS frame should be allocated from sc->pool.Valentin Bartenev1-8/+5
There is no reason to allocate it from connection pool that more like just a bug especially since ngx_http_spdy_settings_frame_handler() already uses sc->pool to free a chain.
2014-01-15SPDY: fixed possible uninitialized memory access.Valentin Bartenev1-2/+2
The frame->stream pointer should always be initialized for control frames since the check against it can be performed in ngx_http_spdy_filter_cleanup().
2014-01-15SPDY: fixed off_t/size_t type conversions on 32 bits platforms.Valentin Bartenev1-5/+4
Parameters of ngx_http_spdy_filter_get_shadow() are changed from size_t to off_t since the last call of the function may get size and offset from the rest of a file buffer. This fixes possible data loss rightfully complained by MSVC on 32 bits systems where off_t is 8 bytes long while size_t is only 4 bytes. The other two type casts are needed just to suppress warnings about possible data loss also complained by MSVC but false positive in these cases.
2014-01-15SPDY: fixed build, broken by b7ee1bae0ffa.Valentin Bartenev1-0/+4
False positive warning about the "cl" variable may be uninitialized in the ngx_http_spdy_filter_get_data_frame() call was suppressed. It is always initialized either in the "while" cycle or in the following "if" condition since frame_size cannot be zero.
2014-01-14SPDY: added the "spdy_chunk_size" directive.Valentin Bartenev3-6/+74
2014-01-14SPDY: implemented buffers chain splitting.Valentin Bartenev2-28/+164
It fixes "chain too big in spdy filter" alerts, and adds full support for rate limiting of SPDY streams.
2014-01-14SPDY: body filter was replaced by c->send_chain() function.Valentin Bartenev3-57/+43
It allows to use ngx_http_write_filter() and all its rate limiting logic.
2014-01-14SPDY: fixed possible premature close of stream.Valentin Bartenev1-0/+1
The "delayed" flag always should be set if there are unsent frames, but this might not be the case if ngx_http_spdy_body_filter() was called with NULL chain. As a result, the "send_timeout" timer could be set on a stream in ngx_http_writer(). And if the timeout occurred before all the stream data has been sent, then the request was finalized with the "client timed out" error.
2014-01-14SPDY: refactored ngx_http_spdy_body_filter().Valentin Bartenev1-5/+8
A local pointer to fake connection is introduced to slightly reduce further patches. No functional changes.
2014-01-14SPDY: elimination of r->blocked counter usage for queuing frames.Valentin Bartenev2-16/+10
It was used to prevent destroying of request object when there are unsent frames in queue for the stream. Since it was incremented for each frame and is only 8 bits long, so it was not very hard to overflow the counter. Now the stream->queued counter is checked instead.
2014-01-14SPDY: better name for flag that indicates incomplete frame state.Valentin Bartenev2-5/+5
No functional changes.
2014-01-14SPDY: better name for queued frames counter.Valentin Bartenev3-11/+12
No functional changes.
2014-01-14SPDY: fixed format specifiers in logging.Valentin Bartenev1-6/+6
2014-01-14Year 2014.Valentin Bartenev1-2/+2
2014-01-10Resolver: added support for domain names with a trailing dot.Yichun Zhang1-0/+4
2014-01-14SSL: fixed ssl_verify_depth to take only one argument.Maxim Dounin1-1/+1
2014-01-10SSL: ssl_session_tickets directive.Dirkjan Bussink4-0/+35
This adds support so it's possible to explicitly disable SSL Session Tickets. In order to have good Forward Secrecy support either the session ticket key has to be reloaded by using nginx' binary upgrade process or using an external key file and reloading the configuration. This directive adds another possibility to have good support by disabling session tickets altogether. If session tickets are enabled and the process lives for a long a time, an attacker can grab the session ticket from the process and use that to decrypt any traffic that occured during the entire lifetime of the process.
2014-01-04Fixed "zero size buf in output" alerts.Maxim Dounin1-21/+37
If a request had an empty request body (with Content-Length: 0), and there were preread data available (e.g., due to a pipelined request in the buffer), the "zero size buf in output" alert might be logged while proxying the request to an upstream. Similar alerts appeared with client_body_in_file_only if a request had an empty request body.
2014-01-04Win32: support for UTF-16 surrogate pairs (ticket #457).Maxim Dounin1-2/+21
2014-01-04Upstream: Cache-Control preferred over Expires.Maxim Dounin1-1/+1
Not really a strict check (as X-Accel-Expires might be ignored or contain invalid value), but quite simple to implement and better than what we have now.
2014-01-04Added per-process random seeding (ticket #456).Maxim Dounin2-1/+3
2014-01-04Allowed up to two EBUSY errors from sendfile().Maxim Dounin2-2/+5
Fallback to synchronous sendfile() now only done on 3rd EBUSY without any progress in a row. Not falling back is believed to be better in case of occasional EBUSY, though protection is still needed to make sure there will be no infinite loop.
2013-12-27Fixed setting of content type in some cases.Ruslan Ermilov3-0/+4
This fixes content type set in stub_status and autoindex responses to be usable in content type checks made by filter modules, such as charset and sub filters.
2013-12-27Style: removed surplus semicolons.Valentin Bartenev3-3/+3
2013-12-26SPDY: a bit smarter ngx_http_spdy_filter_get_data_frame().Valentin Bartenev1-10/+10
There is no need to pass FLAG_FIN as a separate argument since it can always be detected from the last_buf flag of the last frame buffer. No functional changes.
2013-12-26SPDY: refactored loop in ngx_http_spdy_body_filter().Valentin Bartenev1-9/+5
No functional changes.
2013-12-26SPDY: fixed possible request hang.Valentin Bartenev3-11/+23
Processing events from upstream connection can result in sending queued frames from other streams. In this case such streams were not added to handling queue and properly handled. A global per connection flag was replaced by a per stream flag that indicates currently sending stream while all other streams can be added to handling queue.
2013-12-23Dav: emit a warning about unsafe URI.Ruslan Ermilov1-1/+1
2013-12-23Teach ngx_http_parse_unsafe_uri() how to unescape URIs.Ruslan Ermilov2-17/+60
This fixes handling of escaped URIs in X-Accel-Redirect (ticket #316), SSI (ticket #240), and DAV.
2013-12-23Detect more unsafe URIs in ngx_http_parse_unsafe_uri().Ruslan Ermilov1-3/+7
The following URIs were considered safe: "..", "../foo", and "/foo/..".
2013-12-23Upstream: keep $upstream_http_x_accel_redirect intact.Ruslan Ermilov1-4/+4
When processing the X-Accel-Redirect header, the value of the $upstream_http_x_accel_redirect variable was also overwritten.
2013-12-19Fixed the first argument to getsockopt().Ruslan Ermilov1-2/+6
While here, always initialize the last argument.
2013-12-20SSL: ssl_buffer_size directive.Maxim Dounin4-3/+23
2013-12-09Upstream: simplified peer selection loop in the "ip_hash" module.Vladimir Homutov1-18/+28
Conditions for skipping ineligible peers are rewritten to make adding of new conditions simpler and be in line with the "round_robin" and "least_conn" modules. No functional changes.
2013-12-16Resolver: use minimum TTL for caching (ticket #329).Ruslan Ermilov1-6/+7
2013-12-19Typo fixed.Maxim Dounin1-2/+2
2013-12-18SPDY: use predefined constant for size of the Stream-ID field.Valentin Bartenev1-1/+1
No functional changes.
2013-12-18Version bump.Valentin Bartenev1-2/+2
2013-12-17release-1.5.8 tagMaxim Dounin1-0/+1
2013-12-17nginx-1.5.8-RELEASErelease-1.5.8Maxim Dounin1-0/+85
2013-12-13Resolver: lookups are case-insensitive.Ruslan Ermilov1-3/+5
2013-12-09The "ipv6=" boolean parameter of the "resolver" directive.Ruslan Ermilov2-3/+36
When set to "off", only IPv4 addresses will be resolved, and no AAAA queries are ever sent.
2013-12-09Resolver: implemented IPv6 name to address resolving.Ruslan Ermilov5-63/+433
2013-12-06Resolver: implemented IPv6 address to name resolving.Ruslan Ermilov2-80/+398
2013-12-06Changed resolver API to use ngx_addr_t.Ruslan Ermilov7-141/+229
2013-12-13Resolver: fixed indentation.Ruslan Ermilov1-20/+20
2013-12-06Core: externalized ngx_cmp_sockaddr().Ruslan Ermilov3-70/+78
It's also extended with the "cmp_port" argument to indicate whether ports should be compared as well, or only addresses.