> -----Original Message-----
> From: ___cliff rayman___ [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 05, 2002 3:34 PM
> To: [EMAIL PROTECTED]
> Subject: proxy front to modperl back with 1.3.24
>
>
> i had trouble using a proxy front end to both
> a mod_perl and mod_php back end servers.
>
> this works fine for me at 1.3.23, so I reverted
> back to it.  i copied the httpd.conf files
> from the 1.3.24 to my downgraded 1.3.23
> and everything worked correctly on the first
> try.
>
> i was getting garbage characters before the first
> <html> or doctype tag, and a 0 character at
> the end.  also, there was a delay before the
> connection would close.  i tried turning keep
> alives off and on in the back end server,
> but i did not note a change in behavior
> i also tried some different buffer directives,
> including the new ProxyIOBufferSize.
>
> these garbage characters and delays were
> not present serving static content from the
> front end server, or when directly requesting
> content directly from either of the back end
> servers.
>

I have the exact same type setup with my machine.  1.3.24 front-end serving
up a modperl 1.3.24 backend.  As already noted, chunked responses (with
their garbage characters delineating the seperation of chunks) are a
HTTP/1.1 response.  If a HTTP/1.0 client asks for something, it needs to get
a 1.0 response.  The problem is that when the front-end Apache proxy passes
the request onto the mod_perl server, it now always seems to make a 1.1
request.  So when the mod_perl Apache sees this, it answers in 1.1
(chunked), and the front-end Apache server passes this 1.1 response onto 1.0
client.  I figured this out really quickly when people started writing in
and saying "what are all the garbage characters?"  I found a solution that
works.  In the mod_perl Apache httpd.conf file, I added this section:
<IfModule mod_setenvif.c>
    BrowserMatch " " downgrade-1.0 force-response-1.0
    BrowserMatch "." downgrade-1.0 force-response-1.0
    BrowserMatch "/" downgrade-1.0 force-response-1.0
    BrowserMatch "_" downgrade-1.0 force-response-1.0
</IfModule>

It basically catches any browser that has a space, period, slash, or
underscore.  This covers every browser or crawler I had seen.  What this
does is forces the mod_perl Apache to answer in HTTP/1.0.  So:

When a 1.0 client makes a request, the front-end Apache passes this request
onto the mod_perl Apache as a 1.1 request (stupidly), but the mod_perl
Apache will only answer in 1.0.  So the front-end Apache just passes this
1.0 request on.

When a 1.1 client makes a request, the front-end Apache passes this request
onto the mod_perl Apache as a 1.1 request (not stupidly), the mod_perl
Apache will answer in 1.0, but then the front-end Apache will re-format the
request into a 1.1 request to answer the 1.1 client.


What amazingly baffles me is that the Apache team does not have the most
minor test suite that they run to check on things before they make releases.
They have a history of these kinds of problems.  In my mind, they are famous
for re-occuring bugs.  Everytime a bug is found and fixed, a test routine
needs to be built for it that checks for this bug in all future releases.  I
love Apache, and the people behind are amazing, but I am always paranoid of
new releases because of all these recurring (or stupidly easy to find) bugs.

Mark

Reply via email to