You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Paul Perry <pp...@10fold.com> on 1998/08/22 12:23:51 UTC

mod_proxy/2890: When using ProxyPass/ProxyPassReverse relative source strings are not parsed.

>Number:         2890
>Category:       mod_proxy
>Synopsis:       When using ProxyPass/ProxyPassReverse relative source strings are not parsed.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Sat Aug 22 03:30:00 PDT 1998
>Last-Modified:
>Originator:     pperry@10fold.com
>Organization:
apache
>Release:        Solaris 1.3
>Environment:
OS: Solaris 2.6
Patch Level: 5/98
Compiler SUNWspro - WorkShop Compilers 4.2
>Description:
I'm using the directives ProxyPass and ProxyPassReverse

ProxyPass /www_tenfold http://www.10fold.com
ProxyPassReverse /www_tenfold http://www.10fold.com

When I hit the site by doing:
http://nitro.10fold.com/www_tenfold

it only partially works because all relative image source strings that are not
precluded by "www.10fold.com" end up going to "/" on the hosting server using
Apache which has no images directory.  I end up seeing a page that shows tables
but no gifs or images.  It looks broken everywhere.  

Should the directives if used include the use of altering relative paths like
"/images/foo.gif" to "http://www.10fold.com/images/foo.gif"?
>How-To-Repeat:
Unfortunately my companies firewall does not allow you to see the problem but
www.10fold.com is available and you can therefore add the following lines in
your own web server:

ProxyPass /www_tenfold http://www.10fold.com
ProxyPassReverse /www_tenfold http://www.10fold.com

Restart your Apache web server.
With a web browser visit your Apache site with the new changes:
http://[yourserver]/www_tenfold

You will now see the problem as opposed to going directly too:
http://www.10fold.com

Most web sites make the src statements to point at a relative path such as
support.novell.com which has 7 global mirror sites so that they can be mirrored
elsewhere and work independent of the master server being mirrored from.
>Fix:
If these directives are being used, have the web server using the directives,
parse for lines like <img src="/images/foo.gif"> so that relative strings are
altered to absolute paths for links and images etc. so that their precluded
by "http://[sitename]".
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]