summaryrefslogtreecommitdiffhomepage
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-05-22Core: output client port number when logging accept event.Ruslan Ermilov1-3/+11
2014-05-21Mail: added a check for the number of arguments in MAIL/RCPT.Maxim Dounin1-0/+10
Missed during introduction of the SMTP pipelining support (04e43d03e153, 1.5.6). Previously, the check wasn't needed as s->buffer was used directly and the number of arguments didn't matter. Reported by Svyatoslav Nikolsky.
2014-05-12Added syslog support for error_log and access_log directives.Vladimir Homutov10-21/+540
2014-05-20Configure: the --build= option.Ruslan Ermilov4-3/+9
If set, its value is output in "nginx -v" and in the error log.
2014-05-20SSL: $ssl_client_fingerprint variable.Sergey Budnevitch3-0/+39
2014-05-19Setting $args now invalidates unparsed uri.Maxim Dounin1-1/+19
Prodded by Yichun Zhang.
2014-05-19Charset filter: fixed charset setting on encoded replies.Maxim Dounin3-18/+19
If response is gzipped we can't recode response, but in case it's not needed we still can add charset to Content-Type. The r->ignore_content_encoding is dropped accordingly, charset with gzip_static now properly works without any special flags.
2014-05-16Fixed alias in regex locations with limit_except/if.Maxim Dounin1-18/+10
The ngx_http_map_uri_to_path() function used clcf->regex to detect if it's working within a location given by a regular expression and have to replace full URI with alias (instead of a part matching the location prefix). This is incorrect due to clcf->regex being false in implicit locations created by if and limit_except. Fix is to preserve relevant information in clcf->alias instead, by setting it to NGX_MAX_SIZE_T_VALUE if an alias was specified in a regex location.
2014-04-30SPDY: added protection from overrun of the receive buffer.Valentin Bartenev1-0/+8
2014-04-30SPDY: added a debug point to the state buffer overflow protection.Valentin Bartenev1-0/+1
2014-04-30SPDY: refactored ngx_http_spdy_state_headers().Valentin Bartenev1-9/+4
This change is similar to d2ac5cf4056d. Special flag of completeness looks surplus when there is also a counter of frame bytes left.
2014-04-30SPDY: improved logging.Valentin Bartenev2-62/+151
2014-05-15SPDY: set log action for PROXY protocol only while parsing it.Valentin Bartenev1-8/+9
Handling of PROXY protocol for SPDY connection is currently implemented as a SPDY state. And while nginx waiting for PROXY protocol data it continues to process SPDY connection: initializes zlib context, sends control frames.
2014-04-30SPDY: ngx_http_spdy_state_headers() error handling cleanup.Valentin Bartenev1-39/+61
- Specification-friendly handling of invalid header block or special headers. Such errors are not fatal for session and shouldn't lead to connection close; - Avoid mix of NGX_HTTP_PARSE_INVALID_REQUEST/NGX_HTTP_PARSE_INVALID_HEADER.
2014-04-30SPDY: improved error handling of header block decompression.Valentin Bartenev1-17/+43
Now cases when decompression failed due to internal error and when a client sent corrupted data are distinguished.
2014-04-30SPDY: removed ngx_http_spdy_state_headers_error().Valentin Bartenev1-20/+6
The function just calls ngx_http_spdy_state_headers_skip() most of the time. There was also an attempt of optimization to stop parsing if the client already closed connection, but it looks strange and unfinished anyway.
2014-05-15SPDY: prevented creation of RST_STREAM in protocol error state.Valentin Bartenev1-0/+1
Previously, the frame wasn't sent anyway (and had a wrong status code).
2014-04-30SPDY: improved ngx_http_spdy_state_protocol_error().Valentin Bartenev1-9/+15
Now ngx_http_spdy_state_protocol_error() is able to close stream, so there is no need in a separate call for this. Also fixed zero status code in logs for some cases.
2014-04-30SPDY: fixed one case of improper memory allocation error handling.Valentin Bartenev1-1/+2
Now ngx_http_spdy_construct_request_line() doesn't try to finalize request in case of failed memory allocation.
2014-05-14Style: use %N instead of '\n' where appropriate.Ruslan Ermilov2-2/+2
2014-05-14Core: use '\r' for CR and '\n' for LF definitions.Ruslan Ermilov1-3/+3
2014-04-29OCSP stapling: missing OCSP request free call.Filipe da Silva1-0/+2
2014-04-30Upstream: restored workaround for "if".Maxim Dounin1-3/+4
The 7022564a9e0e changeset made ineffective workaround from 2464ccebdb52 to avoid NULL pointer dereference with "if". It is now restored by moving the u->ssl_name initialization after the check. Found by Coverity (CID 1210408).
2014-04-30Core: improved ngx_conf_parse() error handling.Maxim Dounin1-1/+1
Previous code failed to properly restore cf->conf_file in case of ngx_close_file() errors, potentially resulting in double free of cf->conf_file->buffer->start. Found by Coverity (CID 1087507).
2014-04-30Core: fixed error handling in ngx_reopen_files().Maxim Dounin1-0/+6
Found by Coverity (CID 1087509).
2014-04-30Cache: added ngx_quit check to ngx_http_file_cache_expire().Maxim Dounin1-0/+5
While managing big caches it is possible that expiring old cache items in ngx_http_file_cache_expire() will take a while. Added a check for ngx_quit / ngx_terminate to make sure cache manager can be terminated while in ngx_http_file_cache_expire().
2014-04-29Upstream: added the "$upstream_cookie_<name>" variables.Vladimir Homutov5-3/+130
2013-11-18Proxy: fixed possible uninitialized memory access.Valentin Bartenev1-3/+3
The ngx_http_proxy_rewrite_cookie() function expects the value of the "Set-Cookie" header to be null-terminated, and for headers obtained from proxied server it is usually true. Now the ngx_http_proxy_rewrite() function preserves the null character while rewriting headers. This fixes accessing memory outside of rewritten value if both the "proxy_cookie_path" and "proxy_cookie_domain" directives are used in the same location.
2014-04-24Version bump.Valentin Bartenev1-2/+2
2014-04-23SSL: explicit handling of empty names.Maxim Dounin1-0/+4
X509_check_host() can't handle non null-terminated names with zero length, so make sure to fail before calling it.
2014-04-22Upstream: for ssl name, non-aligned memory allocation is enough.Ruslan Ermilov1-1/+1
2014-04-22SSL: added explicit check for ngx_strlchr() result.Maxim Dounin1-0/+5
2014-04-21SPDY: avoid sending RST_STREAM on WINDOW_UPDATE with unknown SID.Valentin Bartenev1-10/+2
There's a race condition between closing a stream by one endpoint and sending a WINDOW_UPDATE frame by another. So it would be better to just skip such frames for unknown streams, like is already done for the DATA frames.
2014-04-21SPDY: Stream-ID restrictions according to specification.Valentin Bartenev1-2/+21
2014-04-18Upstream: uwsgi_ssl_name, uwsgi_ssl_verify, and so on.Maxim Dounin1-0/+85
Just a merge of proxy_ssl_name, proxy_ssl_verify commits into uwsgi module, code is identical.
2014-04-18Upstream: proxy_ssl_verify and friends.Maxim Dounin5-1/+255
2014-04-18Upstream: proxy_ssl_name and proxy_ssl_server_name directives.Maxim Dounin3-0/+137
These directives allow to switch on Server Name Indication (SNI) while connecting to upstream servers. By default, proxy_ssl_server_name is currently off (that is, no SNI) and proxy_ssl_name is set to a host used in the proxy_pass directive.
2014-04-18Upstream: plugged potential memory leak on reload.Maxim Dounin2-16/+16
The SSL_CTX_set_cipher_list() may fail if there are no valid ciphers specified in proxy_ssl_ciphers / uwsgi_ssl_ciphers, resulting in SSL context leak. In theory, ngx_pool_cleanup_add() may fail too, but this case is intentionally left out for now as it's almost impossible and proper fix will require changes to http ssl and mail ssl code as well.
2014-04-18SSL: $ssl_server_name variable.Maxim Dounin3-0/+27
2014-04-18SSL: fixed misuse of NGX_LOG_DEBUG_HTTP.Maxim Dounin1-3/+3
2014-04-18Version bump.Maxim Dounin1-2/+2
2014-04-15Access log: the "if" parameter of the "access_log" directive.Sergey Kandaurov1-10/+47
The parameter value specifies a condition under which the request is logged.
2014-04-16SPDY: fixed typo in log message.Valentin Bartenev1-1/+1
2014-04-16Fixed missing "static" in declaration of ngx_http_gzip_quantity().Valentin Bartenev1-1/+1
2014-04-09SPDY: moved a variable initialization near to its check.Valentin Bartenev1-2/+2
This should prevent attempts of using pointer before it was checked, since all modern compilers are able to spot access to uninitialized variable. No functional changes.
2014-04-08SPDY: fixed arguments supplied for an error message.Valentin Bartenev1-1/+1
2014-04-08Version bump.Valentin Bartenev1-2/+2
2014-04-07SPDY: avoid creating flush frames.Valentin Bartenev1-33/+42
Previously, an empty frame object was created for an output chain that contains only sync or flush empty buffers. But since 39d7eef2e332 every DATA frame has the flush flag set on its last buffer, so there's no need any more in additional flush buffers in the output queue and they can be skipped. Note that such flush frames caused an incorrect $body_bytes_sent value.
2014-04-07SPDY: consistently handle control frames with unknown type.Valentin Bartenev1-5/+10
The SPDY draft 2 specification requires that if an endpoint receives a control frame for a type it does not recognize, it must ignore the frame. But the 3 and 3.1 drafts don't seem to declare any behavior for such case. Then sticking with the previous draft in this matter looks to be right. But previously, only 8 least significant bits of the type field were parsed while the rest of 16 bits of the field were checked against zero. Though there are no known frame types bigger than 255, this resulted in inconsistency in handling of such frames: they were not recognized as valid frames at all, and the connection was closed.
2014-04-07SPDY: refactored ngx_http_spdy_state_read_data().Valentin Bartenev1-7/+2
There's no more need in a separate indicator of frame completeness after d74889fbf06d.