summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-12-26Cache lock support for fastcgi, scgi, uwsgi.Maxim Dounin3-0/+66
2011-12-26Cache locks initial implementation.Maxim Dounin1-0/+22
New directives: proxy_cache_lock on/off, proxy_cache_lock_timeout. With proxy_cache_lock set to on, only one request will be allowed to go to upstream for a particular cache item. Others will wait for a response to appear in cache (or cache lock released) up to proxy_cache_lock_timeout. Waiting requests will recheck if they have cached response ready (or are allowed to run) every 500ms. Note: we intentionally don't intercept NGX_DECLINED possibly returned by ngx_http_file_cache_read(). This needs more work (possibly safe, but needs further investigation). Anyway, it's exceptional situation. Note: probably there should be a way to disable caching of responses if there is already one request fetching resource to cache (without waiting at all). Two possible ways include another cache lock option ("no_cache") or using proxy_no_cache with some supplied variable. Note: probably there should be a way to lock updating requests as well. For now "proxy_cache_use_stale updating" is available.
2011-12-26Fixed mp4 if first entry in stsc was skipped (ticket #72).Maxim Dounin1-0/+2
If first entry in stsc atom was skipped, and seek was to chunk boundary, than first_chunk in the generated stsc table wasn't set to 1.
2011-12-25SSI: added regex captures support in the expression of the "if" command.Valentin Bartenev2-29/+148
2011-12-25Fixed limit_conn_log_level/limit_req_log_level inheritance.Valentin Bartenev2-2/+2
The directives did not work if there were no limit_conn/limit_req specified on the same level.
2011-12-23Proxy: made proxy_pass with variables more consistent.Maxim Dounin1-6/+3
If proxy_pass was used with variables and there was no URI component, nginx always used unparsed URI. This isn't consistent with "no variables" case, where e.g. rewrites are applied even if there is no URI component. Fix is to use the same logic in both cases, i.e. only use unparsed URI if it's valid and request is the main one.
2011-12-19SSI bugfix: the "if" command did not work inside the "block" command andValentin Bartenev1-10/+10
produced parsing errors.
2011-12-19Scgi: removed error if there is no Status header.Maxim Dounin1-3/+0
The SCGI specification doesn't specify format of the response, and assuming CGI specs should be used there is no reason to complain. RFC 3875 explicitly states that "A Status header field is optional, and status 200 'OK' is assumed if it is omitted".
2011-12-19Scgi: removed duplicate function declaration.Maxim Dounin1-1/+0
2011-12-19Fixed incorrect use of r->http_version in scgi module.Maxim Dounin1-9/+3
The r->http_version is a version of client's request, and modules must not set it unless they are really willing to downgrade protocol version used for a response (i.e. to HTTP/0.9 if no response headers are available). In neither case r->http_version may be upgraded. The former code downgraded response from HTTP/1.1 to HTTP/1.0 for no reason, causing various problems (see ticket #66). It was also possible that HTTP/0.9 requests were upgraded to HTTP/1.0.
2011-12-19Version bump.Maxim Dounin1-1/+1
2011-12-12Proxy: added variables and regexp support to the first parameter ofValentin Bartenev1-99/+119
the "proxy_redirect" directive.
2011-12-09SCGI: added "if_not_empty" flag support to the "scgi_param" directive.Valentin Bartenev1-14/+60
2011-12-09uwsgi: added "if_not_empty" flag support to the "uwsgi_param" directive.Valentin Bartenev1-7/+44
2011-12-09FastCGI: added "if_not_empty" flag support to the "fastcgi_param" directive.Valentin Bartenev1-7/+44
2011-12-06- Improved error message when parsing of the "buffer" parameter of theRuslan Ermilov1-1/+7
"access_log" directive fails. - Added a warning if "log_format" is used in contexts other than "http".
2011-12-06Version bump.Maxim Dounin1-1/+1
2011-11-29Version bump.Maxim Dounin1-1/+1
2011-11-28Allowed add_header for proxied 206 replies.Maxim Dounin1-0/+1
It was working for nginx's own 206 replies as they are seen as 200 in the headers filter module (range filter goes later in the headers filter chain), but not for proxied replies.
2011-11-23Fixed "rotate" to always work when combined with "resize/crop".Ruslan Ermilov1-1/+5
2011-11-23Cosmetics.Ruslan Ermilov1-3/+3
2011-11-23Fix of mp4 module seeking.Igor Sysoev1-1/+1
2011-11-18Fixed flv header to match specification.Maxim Dounin1-1/+1
Used "\x5" in 5th byte to claim presence of both audio and video. Used previous tag size 0 in the beginning of the flv body (bytes 10 .. 13) as required by specification (see http://www.adobe.com/devnet/f4v.html). Patch by Piotr Sikora.
2011-11-16Fixed incorrect counting the length of headers in a SCGI request.Valentin Bartenev1-1/+3
2011-11-15Version bump.Maxim Dounin1-1/+1
2011-11-14Fix of "Content-Length" header of MP4 response if start argument was used.Igor Sysoev1-1/+2
Patch by Piotr Sikora.
2011-11-14Renamed ngx_http_limit_zone_module to ngx_http_limit_conn_module.Valentin Bartenev1-102/+102
2011-11-14Fixed fastcgi/scgi/uwsgi_param inheritance.Maxim Dounin3-90/+174
The following problems were fixed: 1. Directive fastcgi_cache affected headers sent to backends in unrelated servers / locations (see ticket #45). 2. If-Unmodified-Since, If-Match and If-Range headers were sent to backends if fastcgi_cache was used. 3. Cache-related headers were sent to backends if there were no fastcgi_param directives and fastcgi_cache was used at server level.
2011-11-14Separate functions to merge fastcgi/scgi/uwsgi params.Maxim Dounin3-87/+123
No functional changes.
2011-11-14Fixed Upgrade header clearing with proxy_cache.Maxim Dounin1-0/+1
This was missed in proxy HTTP/1.1 support commit (r4127).
2011-11-14Fixed proxy_set_header inheritance with proxy_set_body.Maxim Dounin1-17/+12
2011-11-14Fixed proxy_set_header inheritance with proxy_cache (ticket #45).Maxim Dounin1-9/+23
Headers cleared with cache enabled (If-Modified-Since etc.) might be cleared in unrelated servers/locations without proxy_cache enabled if proxy_cache was used in some server/location. Example config which triggered the problem: proxy_set_header X-Test "test"; server { location /1 { proxy_cache name; proxy_pass ... } } server { location /2 { proxy_pass ... } } Another one: server { proxy_cache name; location /1 { proxy_pass ... } location /2 { proxy_cache off; proxy_pass ... } } In both cases If-Modified-Since header wasn't sent to backend in location /2. Fix is to not modify conf->headers_source, but instead merge user-supplied headers from conf->headers_source and default headers (either cache or not) into separate headers_merged array.
2011-11-14Fixed NGX_CONF_TAKE1/NGX_CONF_FLAG misuse.Sergey Budnevitch3-4/+4
2011-11-10Limit zone: added the "limit_conn_zone" directive.Valentin Bartenev1-3/+132
It supersedes old "limit_zone" directive (deprecated accordingly) and uses syntax consistent with the "limit_req_zone" directive.
2011-11-10Limit zone: support for multiple "limit_conn" limits.Valentin Bartenev1-73/+117
2011-11-10Limit zone: rbtree lookup moved to a separate function.Valentin Bartenev1-51/+73
No functional changes.
2011-11-08The "image_filter_sharpen" directive.Igor Sysoev1-1/+71
2011-11-01Ancient incomplete ngx_http_status_module removal.Igor Sysoev1-309/+0
2011-11-01Version bump.Igor Sysoev1-1/+1
2011-10-31Fixed segfault on configuration testing with ssl (ticket #37).Maxim Dounin1-1/+10
The following config caused segmentation fault due to conf->file not being properly set if "ssl on" was inherited from the http level: http { ssl on; server { } }
2011-10-17Fixed "expires @time" with unknown last modified time (ticket #32).Maxim Dounin1-6/+6
2011-10-17Fixed "expires @00h".Maxim Dounin1-1/+1
2011-10-17Version bump.Igor Sysoev1-1/+1
2011-10-13Skipping location rewrite phase for server null location.Igor Sysoev1-0/+12
2011-10-12Better recheck of dead upstream servers.Maxim Dounin1-2/+2
Previously nginx used to mark backend again as live as soon as fail_timeout passes (10s by default) since last failure. On the other hand, detecting dead backend takes up to 60s (proxy_connect_timeout) in typical situation "backend is down and doesn't respond to any packets". This resulted in suboptimal behaviour in the above situation (up to 23% of requests were directed to dead backend with default settings). More detailed description of the problem may be found here (in Russian): http://mailman.nginx.org/pipermail/nginx-ru/2011-August/042172.html Fix is to only allow one request after fail_timeout passes, and mark backend as "live" only if this request succeeds. Note that with new code backend will not be marked "live" unless "check" request is completed, and this may take a while in some specific workloads (e.g. streaming). This is believed to be acceptable.
2011-10-12Clear old Location header (if any) while adding a new one.Maxim Dounin1-0/+2
This prevents incorrect behaviour when another redirect is issued within error_page 302 handler.
2011-10-12Wording fix, "many data" is incorrect.Maxim Dounin1-1/+1
Noted by Piotr Sikora.
2011-10-11Handling of Content-Encoding set from perl.Maxim Dounin1-0/+7
This fixes double gzipping in case of gzip filter being enabled while perl returns already gzipped response.
2011-10-11Autoindex: escape html in file names.Maxim Dounin1-12/+49
2011-10-11Autoindex: escape '?' in file names.Maxim Dounin1-11/+3
For files with '?' in their names autoindex generated links with '?' not escaped. This resulted in effectively truncated links as '?' indicates query string start. This is an updated version of the patch originally posted at [1]. It introduces generic NGX_ESCAPE_URI_COMPONENT which escapes everything but unreserved characters as per RFC 3986. This approach also renders unneeded special colon processing (as colon is percent-encoded now), it's dropped accordingly. [1] http://nginx.org/pipermail/nginx-devel/2010-February/000112.html Reported by Konstantin Leonov.