httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zisis Lianas <Zisis.Lia...@consol.de>
Subject Re: Bug with "ProxyPass /" and mod_proxy_balancer + double-slashes (httpd-2.4.3)
Date Mon, 17 Sep 2012 09:18:29 GMT
----- Original Message -----
> Try
> 
> ProxyPreserveHost Off
> 
> <Proxy balancer://default>
>    BalancerMember http://backend01:5080/ route=0
>    BalancerMember http://backend02:5080/ route=2
>    BalancerMember http://backend01:5180/ route=1
>    BalancerMember http://backend02:5180/ route=3
>    ProxySet lbmethod=bybusyness nofailover=Off
>    stickysession=JSESSIONID|jsessionid
> </Proxy>
> 
> ProxyPass / balancer://default/
> ProxyPassReverse / balancer://default
> 

This configuration seems to work correctly - but this a false conclusion.
If you look deeper in log output/files, you will see that there is still
a double slash inside. Fortunately the final request the browser is sending
to the apache-httpd is "/clusterjsp/", so the cookie is considered and the
session is not lost.

But on backend servers you still get the double-slashed request, e.g.:
"10.x.x.x" "17/Sep/2012:10:43:04 +0100" "GET //clusterjsp/ HTTP/1.1" 200 1590 

So when you perform someting like javax.servlet.http.HttpServletRequest.getRequestURI()
on an applicationserver, you still will see the "//clusterjsp/".

Errorlog debug:
[Mon Sep 17 10:47:55.699519 2012] [proxy_balancer:trace1] [pid 5463:tid 140065930422016] mod_proxy_balancer.c(73):
[client 10.x.x.x:59115] canonicalising URL //default/clusterjsp/
[Mon Sep 17 10:47:55.699558 2012] [proxy_balancer:debug] [pid 5463:tid 140065930422016] mod_proxy_balancer.c(614):
[client 10.x.x.x:59115] AH01172: balancer://default: worker (http://backend02.foo:5180/) rewritten
to http://backend02.foo:5180//clusterjsp/

(attached you will find the whole logfile)


Also with the two patches I mentioned in my first email, its
depended on your config whether you get the doubleslashes or
not in backend.

Maybe we can improve the URL canonicalisation, so that we are
independent of the config? The rfc is on our side ;)


http://www.ietf.org/rfc/rfc3986.txt
 -> 3.3.  Path
    [...]
    path          = path-abempty    ; begins with "/" or is empty
                  / path-absolute   ; begins with "/" but not "//"
                  / path-noscheme   ; begins with a non-colon segment
                  / path-rootless   ; begins with a segment
                  / path-empty      ; zero characters



Mime
View raw message