]> git.kaiwu.me - nginx.git/commit
Proxy: fixed incorrect URI change due to if (ticket #86).
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 9 Dec 2014 15:22:39 +0000 (18:22 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 9 Dec 2014 15:22:39 +0000 (18:22 +0300)
commit827b2511e6ffee946b7b5c00a67bc50449fc2d72
treedbbc97131fb4ef89191476c9bb15f51e4b4475ad
parent8d7c6491fe3dc7cee758a1ec75daf120cd9d82fc
Proxy: fixed incorrect URI change due to if (ticket #86).

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.
src/http/modules/ngx_http_proxy_module.c