Apache and mod_proxy strange behaviour

Apache and mod_proxy strange behaviour

Post by John Ry » Thu, 15 Jun 2000 04:00:00



I'm using Apache to proxy a web on Window NT machine.  I have two proxy
directives:

ProxyPass           /library/ http://10.1.0.31:80/scripts/
ProxyPassReverse    /library/ http://10.1.0.31:80/scripts/

Most things work fine and I can see the web page at
http://www.kgv.net/library/afwiinq.dll? except a logo that should be being
passed at http://www.kgv.net/library/afwiinq.dll?Image?Name=Web comes out
as an http header and the image as garbled text.

If I go directly to the NT machine ie:
http://10.1.0.31/scripts/afwiinq.dll? the image comes out fine.  It also
comes out okay on a couple of isolated browsers.

I've put real addresses, so anyone interested can have a look for real.

Anyone got any ideas?

Regards
John Ryan
Systems Manager
KGV School

--
Posted from student.kgv.edu.hk [152.101.128.2]
via Mailgate.ORG Server - http://www.Mailgate.ORG

 
 
 

Apache and mod_proxy strange behaviour

Post by Richard Homolk » Thu, 15 Jun 2000 04:00:00


It's not mod_proxy's fault.  The DLL is flaky.

If you control that dll, you should change it.  It doesn't set a content
type on output.  I can see it's a JPEG, but without a Content-type:
header, your browser can't.  It also violates the spec by having a blank
line right after the status line.  Could this be a missing content-type
header?  

But wait?  IE works, so . . .
IE violates the spec by looking at the first few bytes of your output
and tries to guess what would be reasonable.  You would think this would
be helpful, but in reality it's a violation of the spec and it's masking
a broken DLL.

BTW: if you get weird output on stuff (like in this case) you really
should investigate it out of the browser, on the command line.  Get a
copy of the HTTP/1.0 spec (It's easier to debug) and just do a telnet.
I did...

telnet www.kgv.net 80
(waited for connection)
GET /library/afwiinq.dll?Image?Name=Web HTTP/1.0[CR]
[CR]

I didn't see Content-type: header.  

You can automate this a bit if you have netcat (aka nc) on your box.  I
have a very bare bones bash shell script that wraps around nc to make
testing easier.  E-mail me if you want it.

--
---------------------------------------------------------------------
Richard Homolka        Iozo.com                        (415) 348-1975


 
 
 

Apache and mod_proxy strange behaviour

Post by John Rya » Fri, 16 Jun 2000 04:00:00


I'm using Apache to proxy a web on Window NT machine.  I have two proxy directives:

ProxyPass           /library/ http://10.1.0.31:80/scripts/
ProxyPassReverse    /library/ http://10.1.0.31:80/scripts/

Most things work fine and I can see the web page at http://www.kgv.net/library/afwiinq.dll? except a logo that should be being
passed at http://www.kgv.net/library/afwiinq.dll?Image?Name=Web comes out as an http header and the image as garbled text.

If I go directly to the NT machine ie: http://10.1.0.31/scripts/afwiinq.dll? the image comes out fine.  It also comes out okay on a couple of isolated browsers.

I've put real addresses, so anyone interested can have a look for real.

Anyone got any ideas?

Regards
John Ryan
Systems Manager
KGV School

 
 
 

Apache and mod_proxy strange behaviour

Post by Hans Svensso » Fri, 16 Jun 2000 04:00:00


Try a little trick:

Access the logo as:

http://www.kgv.net/library/afwiinq.dll/dummy.gif?Image?Name=Web

and see if it helps. By the way, do you really mean to have 2 ?'s in the
path?

Giving the extra path /dummy.gif gives the browser a hint on the type of
content if for some reason the headers aren't ok.

//Hans


> I'm using Apache to proxy a web on Window NT machine.  I have two proxy
> directives:

> ProxyPass           /library/ http://10.1.0.31:80/scripts/
> ProxyPassReverse    /library/ http://10.1.0.31:80/scripts/

> Most things work fine and I can see the web page at
> http://www.kgv.net/library/afwiinq.dll? except a logo that should be being
> passed at http://www.kgv.net/library/afwiinq.dll?Image?Name=Web comes out
> as an http header and the image as garbled text.

> If I go directly to the NT machine ie:
> http://10.1.0.31/scripts/afwiinq.dll? the image comes out fine.  It also
> comes out okay on a couple of isolated browsers.

> I've put real addresses, so anyone interested can have a look for real.

> Anyone got any ideas?

> Regards
> John Ryan
> Systems Manager
> KGV School

> --
> Posted from student.kgv.edu.hk [152.101.128.2]
> via Mailgate.ORG Server - http://www.Mailgate.ORG

 
 
 

1. mod_proxy / proxy_add_forward_module and mod_rewrite: strange behavior !

Hello everyone,

I am using mod_proxy and proxy_add_forward_module to add the original IP
of the client. The configuration is a little bit complexe. I have 2
differents apache running, the 80 one which is as small as possible, the
second one which has the PHP module.

The front one deserve all the files it can handles (everything except
.php3) as the second one handles the PHP. My config file for the front
apache looks like:

<Files ~ "\.php3?$">
    RewriteEngine on
    RewriteBase /
    RewriteCond   %{THE_REQUEST} "^[^ ]+ ([^ ]+)"
    RewriteRule ^(.*)$ http://localhost:8080%1 [proxy]
</Files>

So all the .php3 files are redirected through the proxy. But the
X_FORWARDED_FOR var isn't completed.

If I use the following line:

ProxyPass / http://localhost:8080/

then it works perfect. So I guess this is a problem in mod_rewrite and
the [proxy] type. Does anyone know how to fix that ?

Thanks.

2. Ports

3. Apache and strange behaviour on images....

4. FTP Server Setup Question?

5. Strange behaviour with JavaScript (Netscape+Apache)

6. Xxgdb broken?

7. Help on Apache strange behaviour

8. getty_ps problem with background jobs

9. strange apache behavior w. Embperl and multilang support

10. Apache and strange behaviour with CGIs

11. Apache 1.3.4(6) - mod_perl strange behavior

12. SSI strange behaviour on Apache-2.0.32

13. Apache Directory Indexing, strange behavior