summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-12-22Upstream: added variables support to proxy_cache and friends.Valentin Bartenev4-32/+280
2014-12-22Upstream: refactored proxy_cache and friends.Valentin Bartenev4-74/+78
The configuration handling code has changed to look similar to the proxy_store directive and friends. This simplifies adding variable support in the following patch. No functional changes.
2014-12-22Upstream: mutually exclusive inheritance of "cache" and "store".Valentin Bartenev4-0/+56
Currently, storing and caching mechanisms cannot work together, and a configuration error is thrown when the proxy_store and proxy_cache directives (as well as their friends) are configured on the same level. But configurations like in the example below were allowed and could result in critical errors in the error log: proxy_store on; location / { proxy_cache one; } Only proxy_store worked in this case. For more predictable and errorless behavior these directives now prevent each other from being inherited from the previous level.
2014-12-22Upstream: simplified proxy_store and friends configuration code.Valentin Bartenev4-33/+24
This changes internal API related to handling of the "store" flag in ngx_http_upstream_conf_t. Previously, a non-null value of "store_lengths" was enough to enable store functionality with custom path. Now, the "store" flag is also required to be set. No functional changes.
2014-12-12Autoindex: implemented XML output format.Valentin Bartenev1-0/+105
2014-12-12Autoindex: implemented JSON output format.Valentin Bartenev1-5/+221
2014-12-12Autoindex: rendering code moved to a separate function.Valentin Bartenev1-72/+96
No functional changes.
2014-12-11Headers filter: variables support in expires (ticket #113).Maxim Dounin1-51/+125
2014-12-11Headers filter: local variables for config, no functional changes.Maxim Dounin1-27/+31
2014-10-09Upstream: fixed inheritance of proxy_store and friends.Valentin Bartenev4-4/+4
The proxy_store, fastcgi_store, scgi_store and uwsgi_store were inherited incorrectly if a directive with variables was defined, and then redefined to the "on" value, i.e. in configurations like: proxy_store /data/www$upstream_http_x_store; location / { proxy_store on; }
2014-12-09Proxy: fixed incorrect URI change due to if (ticket #86).Maxim Dounin1-1/+1
In the following configuration request was sent to a backend without URI changed to '/' due to if: location /proxy-pass-uri { proxy_pass http://127.0.0.1:8080/; set $true 1; if ($true) { # nothing } } Fix is to inherit conf->location from the location where proxy_pass was configured, much like it's done with conf->vars.
2014-12-09Upstream: fixed unexpected inheritance into limit_except blocks.Maxim Dounin4-25/+37
The proxy_pass directive and other handlers are not expected to be inherited into nested locations, but there is a special code to inherit upstream handlers into limit_except blocks, as well as a configuration into if{} blocks. This caused incorrect behaviour in configurations with nested locations and limit_except blocks, like this: location / { proxy_pass http://u; location /inner/ { # no proxy_pass here limit_except GET { # nothing } } } In such a configuration the limit_except block inside "location /inner/" unexpectedly used proxy_pass defined in "location /", while it shouldn't. Fix is to avoid inheritance of conf->upstream.upstream (and conf->proxy_lengths) into locations which don't have noname flag.
2014-12-09Upstream: inheritance of proxy_pass and friends (ticket #645).Maxim Dounin4-24/+12
Instead of independant inheritance of conf->upstream.upstream (proxy_pass without variables) and conf->proxy_lengths (proxy_pass with variables) we now test them both and inherit only if neither is set. Additionally, SSL context is also inherited only in this case now. Based on the patch by Alexey Radkov.
2014-12-09Proxy: the "TE" header now stripped by default (ticket #537).Maxim Dounin1-0/+2
2014-12-01Access log: restricted "log_format" to "http" level.Sergey Kandaurov1-7/+1
Specifying the "log_format" directive on levels other than "http" is deprecated since 73d37e1ccb91 (1.1.11).
2014-11-19Proxy: renamed and rearranged fields in proxy configuration.Roman Arutyunyan1-16/+15
No functional changes.
2014-11-19Upstream: different header lists for cached and uncached requests.Roman Arutyunyan4-106/+135
The upstream modules remove and alter a number of client headers before sending the request to upstream. This set of headers is smaller or even empty when cache is disabled. It's still possible that a request in a cache-enabled location is uncached, for example, if cache entry counter is below min_uses. In this case it's better to alter a smaller set of headers and pass more client headers to backend unchanged. One of the benefits is enabling server-side byte ranges in such requests.
2014-11-19Upstream: moved header lists to separate structures.Roman Arutyunyan4-157/+179
No functional changes.
2014-11-19Upstream: moved header initializations to separate functions.Roman Arutyunyan4-89/+82
No functional changes.
2014-11-19Scgi: do not push redundant NULL element into conf->params.Roman Arutyunyan1-7/+0
2014-11-18Cache: proxy_cache_lock_age and friends.Roman Arutyunyan4-0/+44
Once this age is reached, the cache lock is discarded and another request can acquire the lock. Requests which failed to acquire the lock are not allowed to cache the response.
2014-10-30Upstream: add "proxy_ssl_certificate" and friends.Piotr Sikora2-0/+154
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-08-25Access log: cancel the flush timer on graceful shutdown.Valentin Bartenev1-1/+15
Previously, it could prevent a worker process from exiting for up to the configured flush timeout.
2014-10-28Upstream: proxy_limit_rate and friends.Roman Arutyunyan4-0/+44
The directives limit the upstream read rate. For example, "proxy_limit_rate 42" limits proxy upstream read rate to 42 bytes per second.
2014-10-15Gzip, gunzip: flush busy buffers if any.Maxim Dounin2-4/+16
Previous code resulted in transfer stalls when client happened to read all the data in buffers at once, while all gzip buffers were exhausted (but ctx->nomem wasn't set). Make sure to call next body filter at least once per call if there are busy buffers. Additionally, handling of calls with NULL chain was changed to follow the same logic, i.e., next body filter is only called with NULL chain if there are busy buffers. This is expected to fix "output chain is empty" alerts as reported by some users after c52a761a2029 (1.5.7).
2014-10-14Upstream: proxy_force_ranges and friends.Roman Arutyunyan4-0/+44
The directives enable byte ranges for both cached and uncached responses regardless of backend headers.
2014-09-29Upstream keepalive: reset c->sent on cached connections.Maxim Dounin1-0/+1
The c->sent is reset to 0 on each request by server-side http code, so do the same on client side. This allows to count number of bytes sent in a particular request.
2014-09-24Limit req: reduced number of parameters in the lookup function.Valentin Bartenev1-8/+7
No functional changes.
2014-09-24Limit req: use complex value in limit_req_zone.Valentin Bartenev1-60/+47
One intentional side effect of this change is that key is allowed only in the first position. Previously, it was possible to specify the key variable at any position, but that was never documented, and is contrary with nginx configuration practice for positional parameters.
2014-09-24Limit conn: aligned field names in structures.Valentin Bartenev1-11/+11
No functional changes.
2014-09-24Limit conn: use complex value in limit_conn_zone (ticket #121).Valentin Bartenev1-67/+54
One intentional side effect of this change is that key is allowed only in the first position. Previously, it was possible to specify the key variable at any position, but that was never documented, and is contrary to nginx configuration practice for positional parameters.
2014-09-24Limit conn: removed deprecated "limit_zone" directive.Valentin Bartenev1-84/+0
It's deprecated since 260d591cb6a3 (1.1.8). The "limit_conn_zone" directive should be used instead.
2014-09-18FastCGI: fixed start pointers in request buffers.Roman Arutyunyan1-0/+1
The start pointers are used in ngx_http_upstream_reinit() to reinit FastCGI requests.
2014-09-16Limit req: don't truncate key value to 255 bytes.Valentin Bartenev1-1/+1
While the module allows to use values up to 65535 bytes as a key, that actually never worked properly.
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