summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-09-13Access log: fixed the "if=" parameter with buffering (ticket #625).Valentin Bartenev1-21/+20
It might not work if there were more than one "access_log" directives pointed to the same file and duplicate buffer parameters.
2014-09-12Upstream: limited next_upstream time and tries (ticket #544).Roman Arutyunyan5-0/+110
The new directives {proxy,fastcgi,scgi,uwsgi,memcached}_next_upstream_tries and {proxy,fastcgi,scgi,uwsgi,memcached}_next_upstream_timeout limit the number of upstreams tried and the maximum time spent for these tries when searching for a valid upstream.
2014-09-12Upstream: included backup peers into peer.tries.Roman Arutyunyan1-5/+0
Since peer.tries is never reset it can now be limited if required.
2014-09-11Upstream keepalive: removed "single" parameter remnants.Maxim Dounin1-20/+1
The "single" parameter is deprecated and ignored since 5b5c07dee156 (1.3.2).
2014-09-11Added warning about unset cache keys.Maxim Dounin3-0/+15
In fastcgi, scgi and uwsgi modules there are no default cache keys, and using a cache without a cache key set is likely meaningless.
2014-09-11Style.Maxim Dounin2-2/+4
2014-08-29Headers filter: "add_header" with "always" parameter (ticket #98).Sergey Kandaurov1-13/+41
If specified, the header field is set regardless of the status code.
2014-08-27Variables: updated list of prefixes in ngx_http_rewrite_set().Maxim Dounin1-1/+5
2014-08-26Stub status: corrected the "stub_status" directive.Ruslan Ermilov1-1/+1
The "stub_status" directive does not require an argument.
2014-08-25Sub filter: fixed matching for a single character.Valentin Bartenev1-0/+8
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-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-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-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-07-09Style: use ngx_str_set().Tatsuhiko Kubo1-5/+2
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 Sikora1-1/+1
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-06-16SSL: the "ssl_password_file" directive.Valentin Bartenev2-1/+38
2014-06-26Upstream: cache revalidation using If-None-Match.Maxim Dounin4-4/+4
2014-06-26Entity tags: explicit flag to skip not modified filter.Maxim Dounin1-1/+9
Previously, last_modified_time was tested against -1 to check if the not modified filter should be skipped. Notably, this prevented nginx from additional If-Modified-Since (et al.) checks on proxied responses. Such behaviour is suboptimal in some cases though, as checks are always skipped on responses from a cache with ETag only (without Last-Modified), resulting in If-None-Match being ignored in such cases. Additionally, it was not possible to return 412 from the If-Unmodified-Since if last modification time was not known for some reason. This change introduces explicit r->disable_not_modified flag instead, which is set by ngx_http_upstream_process_headers().
2014-06-26Entity tags: weak comparison for If-None-Match.Maxim Dounin1-10/+28
2014-06-26Entity tags: downgrade strong etags to weak ones as needed.Maxim Dounin6-7/+15
See http://mailman.nginx.org/pipermail/nginx-devel/2013-November/004523.html.
2014-06-26Not modified filter: debug log format fixed.Maxim Dounin1-2/+2
2014-06-03Access log: fix default value, broken by cb308813b453.Piotr Sikora1-5/+2
log->filter ("if" parameter) was uninitialized when the default value was being used, which would lead to a crash (SIGSEGV) when access_log directive wasn't specified in the configuration. Zero-fill the whole structure instead of zeroing fields one-by-one in order to prevent similar issues in the future. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-06-02Upstream: generic hash module.Roman Arutyunyan1-0/+631
2014-05-27Sub filter: fixed subrequests handling.Maxim Dounin1-2/+6
In particular, properly output partial match at the end of a subrequest response (much like we do at the end of a response), and reset/set the last_in_chain flag as appropriate. Reported by KAWAHARA Masashi.
2014-05-23Upstream: fix tries check in ip_hash.Roman Arutyunyan1-1/+1
Make two checks for maximum number of tries consistent. The other one checks '>' condition.
2014-05-12Added syslog support for error_log and access_log directives.Vladimir Homutov1-1/+70
2014-05-20SSL: $ssl_client_fingerprint variable.Sergey Budnevitch1-0/+3
2014-05-19Charset filter: fixed charset setting on encoded replies.Maxim Dounin2-17/+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-14Style: use %N instead of '\n' where appropriate.Ruslan Ermilov1-1/+1
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-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 Dounin1-0/+62
2014-04-18Upstream: proxy_ssl_name and proxy_ssl_server_name directives.Maxim Dounin1-0/+26
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 Dounin1-0/+3
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-01Mp4: allow end values bigger than track duration.Roman Arutyunyan1-4/+14
If start time is within the track but end time is out of it, error "end time is out mp4 stts samples" is generated. However it's better to ignore the error and output the track until its end.
2014-03-31Core: slab log_nomem flag.Maxim Dounin1-0/+4
The flag allows to suppress "ngx_slab_alloc() failed: no memory" messages from a slab allocator, e.g., if an LRU expiration is used by a consumer and allocation failures aren't fatal. The flag is now used in the SSL session cache code, and in the limit_req module.
2014-03-31Mp4: improved logging after adding "end" support.Roman Arutyunyan1-27/+71
Despite introducing start and end crop operations existing log messages still mostly refer only to start. Logging is improved to match both cases. New debug logging is added to track entry count in atoms after cropping. Two format type mismatches are fixed as well.
2014-03-31Mp4: fixed seeking to a track end.Roman Arutyunyan1-2/+2
When "start" value is equal to a track duration the request fails with "time is out mp4 stts" like it did before track duration check was added. Now such tracks are considered short and skipped.
2014-03-24Mp4: skipped empty stss atom table in output.Sergey Kandaurov1-8/+13
The atom may have no data entries after cropping. This fixes "zero size buf in output" alerts.
2014-03-21Range filter: single_range flag in request.Maxim Dounin2-2/+5
If set, it means that response body is going to be in more than one buffer, hence only range requests with a single range should be honored. The flag is now used by mp4 and cacheable upstream responses, thus allowing range requests of mp4 files with start/end, as well as range processing on a first request to a not-yet-cached files with proxy_cache. Notably this makes it possible to play mp4 files (with proxy_cache, or with mp4 module) on iOS devices, as byte-range support is required by Apple.
2014-03-20Mp4: added "end" argument support.Roman Arutyunyan1-89/+377
2014-03-20Mp4: moved atom cropping code out of update functions.Roman Arutyunyan1-85/+176
It can now be reused for implementing mp4 end.