summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules/ngx_http_proxy_module.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-05-11Proxy: $proxy_internal_body_length fixed.Maxim Dounin1-1/+2
The $proxy_internal_body_length value might change during request lifetime, notably if proxy_set_body used, and use of a cached value might result in incorrect upstream requests. Patch by Lanshun Zhou.
2013-02-27Correctly handle multiple X-Forwarded-For headers (ticket #106).Ruslan Ermilov1-9/+21
2013-02-18Proxy: support for connection upgrade (101 Switching Protocols).Maxim Dounin1-0/+8
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-22Proxy: fixed proxy_method to always add space.Maxim Dounin1-4/+5
Before the patch if proxy_method was specified at http{} level the code to add trailing space wasn't executed, resulting in incorrect requests to upstream.
2013-01-16Fixed and improved the "*_bind" directives of proxying modules.Ruslan Ermilov1-0/+5
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.
2012-12-13Proxy: better error message about unexpected data.Maxim Dounin1-1/+2
Requested by Igor Sysoev.
2012-12-06Allow the complex value to be defined as an empty string.Ruslan Ermilov1-2/+2
This makes conversion from strings to complex values possible without the loss of functionality.
2012-11-21Request body: always use calculated size of a request body in proxy.Maxim Dounin1-16/+11
This allows to handle requests with chunked body, and also simplifies handling of various request body modifications.
2012-11-21Request body: chunked parsing moved to ngx_http_parse.c from proxy.Maxim Dounin1-276/+14
No functional changes.
2012-04-23Proxy: added ctx checking to input filters.Maxim Dounin1-0/+18
The proxy module context may be NULL in case of filter finalization (e.g. by image_filter) followed by an internal redirect. This needs some better handling, but for now just check if ctx is still here.
2012-04-12Fixed grammar in error messages.Ruslan Ermilov1-11/+11
2012-03-15Fixed incorrect ngx_cpystrn() usage in ngx_http_*_process_header().Maxim Dounin1-2/+4
This resulted in a disclosure of previously freed memory if upstream server returned specially crafted response, potentially exposing sensitive information. Reported by Matthew Daley.
2012-02-28Fixed spelling in single-line comments.Ruslan Ermilov1-2/+2
2012-02-13Proxy: added the "proxy_cookie_path" directive.Valentin Bartenev1-4/+127
2012-02-13Proxy: added the "proxy_cookie_domain" directive.Valentin Bartenev1-0/+202
2012-02-13Proxy: generic regex related code from the "proxy_redirect" directive movedValentin Bartenev1-23/+47
to a separate function. No functional changes.
2012-02-13Proxy: generic rewrite code from the "proxy_redirect" handlers moved to aValentin Bartenev1-44/+52
separate function with trivial optimization. No functional changes.
2012-02-13Proxy: renamed some "proxy_redirect" related declarations to a more general andValentin Bartenev1-45/+45
reusable. No functional changes.
2012-01-30Fixed proxy_redirect off inheritance.Valentin Bartenev1-0/+2
Example configuration to reproduce: server { proxy_redirect off; location / { proxy_pass http://localhost:8000; proxy_redirect http://localhost:8000/ /; location ~ \.php$ { proxy_pass http://localhost:8000; # proxy_redirect must be inherited from the level above, # but instead it was switched off here } } }
2012-01-18Copyright updated.Maxim Konovalov1-0/+1
2012-01-16Fixed proxy_cache_use_stale in "no live upstreams" case.Maxim Dounin1-5/+9
2012-01-11Added support for TLSv1.1, TLSv1.2 in ssl_protocols directive.Maxim Dounin1-1/+3
Support for TLSv1.1 and TLSv1.2 protocols was introduced in OpenSSL 1.0.1 (-beta1 was recently released). This change makes it possible to disable these protocols and/or enable them without other protocols.
2012-01-10Fixed: proxy_redirect with regex might broke Refresh header.Valentin Bartenev1-1/+19
The problem was localized in ngx_http_proxy_rewrite_redirect_regex() handler function which did not take into account prefix when overwriting header value.
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-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-12Proxy: added variables and regexp support to the first parameter ofValentin Bartenev1-99/+119
the "proxy_redirect" directive.
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-10-12Wording fix, "many data" is incorrect.Maxim Dounin1-1/+1
Noted by Piotr Sikora.
2011-09-25Proxy: logging levels tuned, double logging fixed.Maxim Dounin1-6/+3
2011-09-25Proxy: whitespaces after chunk size allowed.Maxim Dounin1-0/+4
Whitespaces after chunk size seems to be be allowed by the "implied *LWS" rule and emitted by some servers.
2011-09-15Proxy: basic HTTP/1.1 support (including keepalive).Maxim Dounin1-5/+773
By default we still send requests using HTTP/1.0. This may be changed with new proxy_http_version directive.
2011-09-15Protocol version parsing in ngx_http_parse_status_line().Maxim Dounin1-0/+5
Once we know protocol version, set u->headers_in.connection_close to indicate implicitly assumed connection close with HTTP before 1.1.
2011-08-18Fixing proxy_set_body and proxy_pass_request_body with SSL.Maxim Dounin1-2/+1
Flush flag wasn't set in constructed buffer and this prevented any data from being actually sent to upstream due to SSL buffering. Make sure we always set flush in the last buffer we are going to sent. See here for report: http://nginx.org/pipermail/nginx-ru/2011-June/041552.html
2011-07-30test length of proxy_pass with variablesIgor Sysoev1-4/+6
patch by Lanshun Zhou
2011-07-29update r3945 with more descriptive error messageIgor Sysoev1-0/+2
2011-02-17always test proxy_redirect with slash, this fixes a case when nginx usesIgor Sysoev1-4/+30
proxy_pass "http://www", upstream redirects to "http://www.host/uri", and nginx rewrites it as ".host/uri" patch by Maxim Dounin
2010-08-03*) make code consistent to fastcgi, etcIgor Sysoev1-6/+5
*) remove STUB comment
2010-08-03use NULL instead of 0Igor Sysoev1-1/+1
2010-08-03inherit proxy_pass, fastcgi_pass, uwsgi_pass, scgi_pass insideIgor Sysoev1-0/+8
a limit_except block if no handler was defined for the block
2010-08-02fix directive typeIgor Sysoev1-4/+4
2010-07-19add warnings for proxy_no_cache and fastcgi_no_cacheIgor Sysoev1-0/+6
2010-07-19proxy_cache_pass, fastcgi_cache_bypass, uwsgi_cache_bypass, scgi_cache_bypassIgor Sysoev1-0/+11
2010-07-14use ngx_http_test_predicates(), ngx_http_set_predicate_slot()Igor Sysoev1-1/+1
delete ngx_http_cache(), ngx_http_no_cache_set_slot()
2010-07-02do not use a cache headers set to hideIgor Sysoev1-27/+1
2010-07-02use shared ngx_http_upstream_ignore_headers_masks[]Igor Sysoev1-10/+1
2010-06-15fix r3628Igor Sysoev1-3/+0
2010-06-15make code more obviuosIgor Sysoev1-5/+6
2010-06-15use ngx_http_parse_status_line()Igor Sysoev1-228/+13