summaryrefslogtreecommitdiffhomepage
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-08-20Mail: fixed number of arguments allowed in the listen directive.Valentin Bartenev1-1/+1
2014-08-20Mail: fixed a comment.Valentin Bartenev1-2/+1
There's no loc_conf in the mail module.
2014-08-19Mp4: use trak->smhd_size in ngx_http_mp4_read_smhd_atom().Roman Arutyunyan1-1/+1
Reported by Gang Li.
2014-08-18Image filter: downgrade strong etags to weak ones as needed.Sergey Kandaurov1-0/+1
2014-08-15Fixed typo.Sergey Kandaurov1-1/+1
2014-08-10Events: removed unused variable in ngx_poll_process_events().Maxim Dounin1-4/+1
2014-08-07Events: format specifier fixes.Yves Crespin2-6/+6
2014-08-07Events: changed nevents type to unsigned in poll module.Yves Crespin1-6/+6
2014-08-06Style: use specified macro instead of magic-number.Tatsuhiko Kubo1-1/+1
2014-06-19Perl: NULL-terminate argument list.Piotr Sikora1-1/+2
perl_parse() function expects argv/argc-style argument list, which according to the C standard must be NULL-terminated, that is: argv[argc] == NULL. This change fixes a crash (SIGSEGV) that could happen because of the buffer overrun during perl module initialization. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-08-06Access log: allowed logs to syslog with "if=" (ticket #596).Maxim Dounin1-11/+6
2014-08-05Version bump.Maxim Dounin1-2/+2
2014-08-05Mail: discard pipelined commands after SMTP STARTTLS.Maxim Dounin1-0/+3
The bug had appeared in nginx 1.5.6 (04e43d03e153). Reported by Chris Boulton.
2014-08-01Core: exit on ngx_pnalloc() failure.Piotr Sikora1-0/+4
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-08-03Style: use ngx_free() instead of free().Tatsuhiko Kubo1-1/+1
2014-08-01Core: improved ngx_pstrdup() error handling.Tatsuhiko Kubo1-0/+3
2014-08-01Status: indentation and style, no functional changes.Sergey Kandaurov1-7/+9
2014-07-30Dav: ngx_http_map_uri_to_path() errors were not checked.FengGu1-4/+16
Once error occured, it could lead to use uninitialized variables to log, even more segmentation fault.
2014-07-30SSL: let it build against LibreSSL.Piotr Sikora1-3/+3
LibreSSL developers decided that LibreSSL is OpenSSL-2.0.0, so tests for OpenSSL-1.0.2+ are now passing, even though the library doesn't provide functions that are expected from that version of OpenSSL. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-30SSL: let it build against BoringSSL.Piotr Sikora1-0/+10
This change adds support for using BoringSSL as a drop-in replacement for OpenSSL without adding support for any of the BoringSSL-specific features. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-28SSL: fix build with OPENSSL_NO_ENGINE and/or OPENSSL_NO_OCSP.Piotr Sikora3-1/+15
This is really just a prerequisite for building against BoringSSL, which doesn't provide either of those features. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-28Bigger iovec buffer in ngx_readv_chain().Maxim Dounin1-1/+5
This helps to reduce likelyhood of memory allocations in ngx_readv_chain(), which are known to lead to noticeable effects in some cases, see http://mailman.nginx.org/pipermail/nginx/2014-July/044512.html.
2014-07-28SSL: misplaced space in debug message.Maxim Dounin1-1/+1
2014-07-28Upstream: SSL handshake timeouts.Maxim Dounin1-0/+5
Timeout may not be set on an upstream connection when we call ngx_ssl_handshake() in ngx_http_upstream_ssl_init_connection(), so make sure to arm it if it's not set. Based on a patch by Yichun Zhang.
2014-07-25GeoIP: not all variable fields were initialized.Yichun Zhang1-0/+6
The ngx_http_geoip_city_float_variable and ngx_http_geoip_city_int_variable functions did not always initialize all variable fields like "not_found", which could lead to empty values for those corresponding nginx variables randomly.
2014-06-26Core: use uppercase hexadecimal digits for percent-encoding.Piotr Sikora1-1/+1
RFC3986 says that, for consistency, URI producers and normalizers should use uppercase hexadecimal digits for all percent-encodings. This is also what modern web browsers and other tools use. Using lowercase hexadecimal digits makes it harder to interact with those tools in case when use of the percent-encoded URI is required, for example when $request_uri is part of the cache key. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-24Core: fixed default log initialization.Vladimir Homutov1-4/+6
The ngx_log_insert() function may invalidate pointer passed to it, so make sure to don't use it after the ngx_log_insert() call.
2014-07-18Upstream: ngx_http_upstream_store() error handling fixes.Maxim Dounin1-2/+5
Previously, ngx_http_map_uri_to_path() errors were not checked in ngx_http_upstream_store(). Moreover, in case of errors temporary files were not deleted, as u->store was set to 0, preventing cleanup code in ngx_http_upstream_finalize_request() from removing them. With this patch, u->store is set to 0 only if there were no errors. Reported by Feng Gu.
2014-07-18Reset of r->uri.len on URI parsing errors.Maxim Dounin1-0/+2
This ensures that debug logging and the $uri variable (if used in 400 Bad Request processing) will not try to access uninitialized memory. Found by Sergey Bobrov.
2014-07-16Resolver: fixed resend on malformed responses.Ruslan Ermilov1-2/+27
DNS request resend on malformed responses was broken in 98876ce2a7fd (1.5.8). Reported by Pramod Korathota.
2014-07-09SSL: fix build with recent OpenSSL.Piotr Sikora1-4/+4
X509_check_host() prototype changed recently: - http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=ced3d91 - http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=297c67f Bump version requirement, so that OpenSSL-1.0.2-beta1 uses fallback code. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-06-18Core: bugfix for the ngx_slab_max_size case.Jianjun Zheng1-1/+1
2014-07-09Style: use ngx_str_set().Tatsuhiko Kubo1-5/+2
2014-07-09Style: use ngx_str_null().Tatsuhiko Kubo1-2/+1
2014-07-09Style: use ngx_strlen() instead of strlen().Tatsuhiko Kubo1-1/+1
2014-07-08SPDY: fix support for headers with multiple values.Piotr Sikora1-0/+2
Split SPDY header with multiple, NULL-separated values: cookie: foo\0bar into two separate HTTP headers with the same name: cookie: foo cookie: bar Even though the logic for this behavior already existed in the source code, it doesn't look that it ever worked and SPDY streams with such headers were simply rejected. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-08Style: fix typo.Piotr Sikora1-1/+1
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-08Style: use ngx_memcpy() instead of memcpy().Piotr Sikora1-1/+1
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-08Style: keep return type and function name on different lines.Piotr Sikora1-3/+6
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-08Style: remove whitespace between function name and parentheses.Piotr Sikora3-5/+5
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-08Style: add whitespace between control statement and parentheses.Piotr Sikora5-9/+9
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-06SSL: stop accessing SSL_SESSION's fields directly.Piotr Sikora2-22/+48
SSL_SESSION struct is internal part of the OpenSSL library and it's fields should be accessed via API (when exposed), not directly. The unfortunate side-effect of this change is that we're losing reference count that used to be printed at the debug log level, but this seems to be an acceptable trade-off. Almost fixes build with -DOPENSSL_NO_SSL_INTERN. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-09SSL: fixed build with OPENSSL_NO_DEPRECATED defined.Maxim Dounin1-0/+4
The RSA_generate_key() is marked as deprecated and causes build to fail. On the other hand, replacement function, RSA_generate_key_ex(), requires much more code. Since RSA_generate_key() is only needed for barely usable EXP ciphers, the #ifdef was added instead. Prodded by Piotr Sikora.
2014-07-06SSL: return temporary RSA key only when the key length matches.Piotr Sikora1-4/+6
This change is mostly cosmetic, because in practice this callback is used only for 512-bit RSA keys. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-06SSL: include correct OpenSSL headers.Piotr Sikora1-0/+7
Previously, <bn.h>, <dh.h>, <rand.h> and <rsa.h> were pulled in by <engine.h> using OpenSSL's deprecated interface, which meant that nginx couldn't have been built with -DOPENSSL_NO_DEPRECATED. Both <x509.h> and <x509v3.h> are pulled in by <ocsp.h>, but we're calling X509 functions directly, so let's include those as well. <crypto.h> is pulled in by virtually everything, but we're calling CRYPTO_add() directly, so let's include it as well. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-09Version bump.Maxim Dounin1-2/+2
2014-07-05Win32: ngx_open_dir() and ngx_close_dir() fixes.Maxim Dounin2-1/+14
The ngx_open_dir() function changed to restore name passed to it. This fixes removing destination directory in dav module, as caught by dav.t. The ngx_close_dir() function introduced to properly convert errors, as FindClose() returns 0 on error.
2014-07-04SSL: logging level of "peer closed connection in SSL handshake".Maxim Dounin1-2/+2
Previously, the NGX_LOG_INFO level was used unconditionally. This is correct for client SSL connections, but too low for connections to upstream servers. To resolve this, ngx_connection_error() now used to log this error, it will select logging level appropriately. With this change, if an upstream connection is closed during SSL handshake, it is now properly logged at "error" level.
2014-07-04Upstream: p->downstream_error instead of closing connection.Maxim Dounin2-21/+12
Previously, nginx closed client connection in cases when a response body from upstream was needed to be cached or stored but shouldn't be sent to the client. While this is normal for HTTP, it is unacceptable for SPDY. Fix is to use instead the p->downstream_error flag to prevent nginx from sending anything downstream. To make this work, the event pipe code was modified to properly cache empty responses with the flag set.
2014-07-01Upstream: fixed handling of write event after sending request.Valentin Bartenev1-7/+7
The ngx_http_upstream_dummy_handler() must be set regardless of the read event state. This prevents possible additional call of ngx_http_upstream_send_request_handler().