In ngx_http_subrequest, the newly initialized subrequest's
unparsed_uri is set to the same value as the parent request's
unparsed_uri. (I'm looking at 0.8.33.)
This interacts in a bad way with the proxy module. The proxy code
that builds the request to the upstream, in ngx_http_proxy_eval, uses
the subrequest's unparsed_uri, rather than its uri.
The result is that, if a request for /prefix/foo creates a subrequest
for /prefix/bar, and the server has been configured to proxy /prefix/*
to some upstream, the subrequest will result in an upstream request
for /prefix/foo (the same URI as the parent request) rather than
/prefix/foo.
Is that a bug, or is it the intended behavior?
Thanks,
Brian
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel