summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_upstream.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-03-28Upstream: proxy_next_upstream non_idempotent.Maxim Dounin1-0/+1
By default, requests with non-idempotent methods (POST, LOCK, PATCH) are no longer retried in case of errors if a request was already sent to a backend. Previous behaviour can be restored by using "proxy_next_upstream ... non_idempotent".
2016-03-23Resolver: added support for SRV records.Dmitry Volyntsev1-1/+1
2015-12-17Upstream: don't keep connections on early responses (ticket #669).Maxim Dounin1-0/+1
2015-11-11Upstream: proxy_cache_convert_head directive.Roman Arutyunyan1-0/+1
The directive toggles conversion of HEAD to GET for cacheable proxy requests. When disabled, $request_method must be added to cache key for consistency. By default, HEAD is converted to GET as before.
2015-05-16Upstream: $upstream_connect_time.Ruslan Ermilov1-0/+1
The variable keeps time spent on establishing a connection with the upstream server.
2015-05-16Upstream: times to obtain header/response are stored as ngx_msec_t.Ruslan Ermilov1-4/+2
2015-04-14Upstream: the "zone" directive.Ruslan Ermilov1-0/+4
Upstreams with the "zone" directive are kept in shared memory, with a consistent view of all worker processes.
2015-03-23Request body: unbuffered reading.Maxim Dounin1-0/+1
The r->request_body_no_buffering flag was introduced. It instructs client request body reading code to avoid reading the whole body, and to call post_handler early instead. The caller should use the ngx_http_read_unbuffered_request_body() function to read remaining parts of the body. Upstream module is now able to use this mode, if configured with the proxy_request_buffering directive.
2015-01-14Upstream: $upstream_header_time variable.Vladimir Homutov1-0/+2
Keeps time spent on obtaining the header from an upstream server. The value is formatted similar to the $upstream_response_time variable.
2014-12-22Upstream: added variables support to proxy_cache and friends.Valentin Bartenev1-0/+4
2014-12-22Upstream: refactored proxy_cache and friends.Valentin Bartenev1-1/+4
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-11-18Cache: proxy_cache_lock_age and friends.Roman Arutyunyan1-0/+1
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-28Upstream: proxy_limit_rate and friends.Roman Arutyunyan1-0/+1
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-27Cache: disable caching of responses with Vary (ticket #118).Maxim Dounin1-0/+2
The "proxy_ignore_header" directive now undersands the "Vary" parameter to ignore the header as needed.
2014-10-14Upstream: proxy_force_ranges and friends.Roman Arutyunyan1-0/+1
The directives enable byte ranges for both cached and uncached responses regardless of backend headers.
2014-09-12Upstream: limited next_upstream time and tries (ticket #544).Roman Arutyunyan1-0/+2
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-06-26Upstream: fixed cache revalidation with SSI.Maxim Dounin1-2/+3
Previous code in ngx_http_upstream_send_response() used last modified time from r->headers_out.last_modified_time after the header filter chain was already called. At this point, last_modified_time may be already cleared, e.g., with SSI, resulting in incorrect last modified time stored in a cache file. Fix is to introduce u->headers_in.last_modified_time instead.
2014-06-02Upstream: generic hash module.Roman Arutyunyan1-0/+1
2014-04-29Upstream: added the "$upstream_cookie_<name>" variables.Vladimir Homutov1-0/+3
2014-04-18Upstream: proxy_ssl_verify and friends.Maxim Dounin1-0/+1
2014-04-18Upstream: proxy_ssl_name and proxy_ssl_server_name directives.Maxim Dounin1-0/+7
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.
2013-12-06Changed resolver API to use ngx_addr_t.Ruslan Ermilov1-1/+1
2013-11-18Upstream: cache revalidation with conditional requests.Maxim Dounin1-0/+2
The following new directives are introduced: proxy_cache_revalidate, fastcgi_cache_revalidate, scgi_cache_revalidate, uwsgi_cache_revalidate. Default is off. When set to on, they enable cache revalidation using conditional requests with If-Modified-Since for expired cache items. As of now, no attempts are made to merge headers given in a 304 response during cache revalidation with headers previously stored in a cache item. Headers in a 304 response are only used to calculate new validity time of a cache item.
2013-05-27Upstream: http_403 support in proxy_next_upstream (and friends).Maxim Dounin1-4/+6
The parameter is mostly identical to http_404, and is expected to be used in similar situations. The 403 code might be returned by a backend instead of 404 on initial sync of new directories with rsync. See here for feature request and additional details: http://mailman.nginx.org/pipermail/nginx-ru/2013-April/050920.html
2013-02-18Proxy: support for connection upgrade (101 Switching Protocols).Maxim Dounin1-0/+3
This allows to proxy WebSockets by using configuration like this: location /chat/ { proxy_pass http://backend; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } Connection upgrade is allowed as long as it was requested by a client via the Upgrade request header.
2013-01-16Fixed and improved the "*_bind" directives of proxying modules.Ruslan Ermilov1-1/+7
The "proxy_bind", "fastcgi_bind", "uwsgi_bind", "scgi_bind" and "memcached_bind" directives are now inherited; inherited value can be reset by the "off" parameter. Duplicate directives are now detected. Parameter value can now contain variables.
2013-01-10Fixed "proxy_pass" with IP address and no port (ticket #276).Ruslan Ermilov1-0/+1
Upstreams created by "proxy_pass" with IP address and no port were broken in 1.3.10, by not initializing port in u->sockaddr. API change: ngx_parse_url() was modified to always initialize port (in u->sockaddr and in u->port), even for the u->no_resolve case; ngx_http_upstream() and ngx_http_upstream_add() were adopted.
2012-02-13Upstream: added callback hook for the "Set-Cookie" header.Valentin Bartenev1-0/+2
No functional changes.
2012-01-18Copyright updated.Maxim Konovalov1-0/+1
2011-12-26Cache locks initial implementation.Maxim Dounin1-0/+3
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-09Added the ngx_http_upstream_param_set_slot().Valentin Bartenev1-0/+9
2011-10-11Additional headers for proxy/fastcgi/uwsgi/scgi_ignore_headers.Maxim Dounin1-0/+3
Now the following headers may be ignored as well: X-Accel-Limit-Rate, X-Accel-Buffering, X-Accel-Charset.
2011-09-15Upstream: Connection header processing.Maxim Dounin1-0/+1
2011-09-15Upstream: Transfer-Encoding header processing.Maxim Dounin1-0/+3
2011-09-15Upstream: keepalive flag.Maxim Dounin1-0/+1
This patch introduces r->upstream->keepalive flag, which is set by protocol handlers if connection to upstream is in good state and can be kept alive.
2011-09-15Upstream: r->upstream->length type change to off_t.Maxim Dounin1-1/+1
Previous use of size_t may cause wierd effects on 32bit platforms with certain big responses transferred in unbuffered mode. Nuke "if (size > u->length)" check as it's not usefull anyway (preread body data isn't subject to this check) and now requires additional check for u->length being positive.
2011-07-29update r3945 with more descriptive error messageIgor Sysoev1-0/+1
2010-11-26style fixIgor Sysoev1-1/+1
2010-07-19proxy_cache_pass, fastcgi_cache_bypass, uwsgi_cache_bypass, scgi_cache_bypassIgor Sysoev1-1/+2
2010-07-02treat Set-Cookie as a header that forbids cachingIgor Sysoev1-0/+1
2010-07-02use shared ngx_http_upstream_ignore_headers_masks[]Igor Sysoev1-0/+1
2010-05-24proxy_no_cache and fastcgi_no_cacheIgor Sysoev1-0/+1
2009-12-23fix typoIgor Sysoev1-1/+1
2009-11-02proxy_bind, fastcgi_bind, and memcached_bindIgor Sysoev1-0/+4
2009-11-02rename ngx_peer_addr_t to ngx_addr_tIgor Sysoev1-1/+1
2009-11-02style fixIgor Sysoev1-1/+0
2009-07-27ngx_http_upstream_create() to cleanup the previous upstream afterIgor Sysoev1-0/+1
internal redirect
2009-06-18$upstream_cache_statusIgor Sysoev1-1/+1
2009-06-06proxy_cache_use_stale/fastcgi_cache_use_stale updatingIgor Sysoev1-2/+3
2009-05-19proxy_cache_methods and fastcgi_cache_methodsIgor Sysoev1-1/+4