ðòïåëôù 


  áòèé÷ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  óôáôøé 


  ðåòóïîáìøîïå 


  ðòïçòáííù 



ðéûéôå
ðéóøíá












     áòèé÷ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rewrite / proxy_pass different bahaviour in 1.0 and 1.2



Hello!

On Fri, Sep 28, 2012 at 11:36:49AM -0400, alexey.radkov wrote:

> Hi guys.
> 
> 
> Is the following result of a bug fix in proxy module in 1.2 series?
> 
> Imagine following config (sorry, i do not know how to format it here):

[...]

>         location /test.html {
>             rewrite ^ /Internal_test last;
>         }
> 
>         location /Internal_test {
>             internal;
>             proxy_pass http://$arg_a;
>         }
>     }

[...]

> and following request:
> 
> curl 'http://localhost:8010/test.html?a=ubackend'

[...]

> So the difference is that in 1.0 original URI is not rewritten in HTTP GET
> header when proxied after rewrite, but in 1.2 it is rewritten to
> /Internal_test thus giving result 404 Not Found.
> 
> 
> Do I understand this right that 1.0 behaviour was not correct and just fixed
> in 1.2?

Yes.  This was fixed 1.1.12:

    *) Bugfix: a "proxy_pass" directive without URI part always used
       original request URI if variables were used.

> To achieve 1.0 behaviour in 1.2 i can add only 2 lines of code from 1.0.

You may also use

   proxy_pass http://$arg_a$request_uri;

to get the old behaviour.

[...]

-- 
Maxim Dounin
http://nginx.com/support.html

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.