Re: proxy front to modperl back with 1.3.24

2002-04-06 Thread Ed

FYI,

There is a patch this morning from the mod_proxy maintainer.

http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=101810478231242&w=2

Ed

On Fri, Apr 05, 2002 at 02:33:35PM -0800, ___cliff rayman___ wrote:
> 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
>  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 know they've made some mods to the
> proxy module, including support for HTTP/1.1,
> but i did not have time to research the exact
> cause of the problem.
> 
> just a word of warning before someone
> spends hours in frustration, or perhaps
> someone can give me a tip if they've
> solved this problem.
> 
> --
> ___cliff [EMAIL PROTECTED]http://www.genwax.com/
> 
> 



RE: proxy front to modperl back with 1.3.24

2002-04-05 Thread Mark Hazen



> -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
>  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:

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


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




Re: proxy front to modperl back with 1.3.24

2002-04-05 Thread Thomas Eibner

On Fri, Apr 05, 2002 at 03:23:38PM -0800, ___cliff rayman___ wrote:
> Thomas Eibner wrote:
> 
> >
> > There are some few messages concerning the problem a while ago either on
> > this list or the dev@httpd list.
> >
> > http://msgs.securepoint.com/cgi-bin/get/apache0204/1/3.html
> > etc.
> 
> thanks - it must have been a bad googling day yesterday since i did not come
> up with this info.

Somehow google actually just indexed that message it seems, Apr 05 was the
time stamp. But there was some discussion about it on dev@httpd when
1.3.24 was released.

> >
> >
> > Can't really remember if they have fixed it in CVS already.
> 
> i'll wait till 1.3.25 which will probably be coming out sooner than
> expected.  ;-)

Let's see - with the dev people pushing for GA on 2.0.

-- 
  Thomas Eibner  DnsZone 
  mod_pointer  



Re: proxy front to modperl back with 1.3.24

2002-04-05 Thread ___cliff rayman___

Thomas Eibner wrote:

>
> There are some few messages concerning the problem a while ago either on
> this list or the dev@httpd list.
>
> http://msgs.securepoint.com/cgi-bin/get/apache0204/1/3.html
> etc.

thanks - it must have been a bad googling day yesterday since i did not come
up with this info.

>
>
> Can't really remember if they have fixed it in CVS already.

i'll wait till 1.3.25 which will probably be coming out sooner than
expected.  ;-)


--
___cliff [EMAIL PROTECTED]http://www.genwax.com/





Re: proxy front to modperl back with 1.3.24

2002-04-05 Thread Thomas Eibner

On Fri, Apr 05, 2002 at 02:33:35PM -0800, ___cliff rayman___ wrote:
> 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
>  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.

That was the size of the document when you get it in a chunked
response. And there were some problems in 1.3.24 where mod_proxy
returned the data it had collected in the chunked format even if
the client requesting the data didn't explicitly ask for it. 

> 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 know they've made some mods to the
> proxy module, including support for HTTP/1.1,
> but i did not have time to research the exact
> cause of the problem.
> 
> just a word of warning before someone
> spends hours in frustration, or perhaps
> someone can give me a tip if they've
> solved this problem.

There are some few messages concerning the problem a while ago either on
this list or the dev@httpd list.

http://msgs.securepoint.com/cgi-bin/get/apache0204/1/3.html
etc.

Can't really remember if they have fixed it in CVS already.

-- 
  Thomas Eibner  DnsZone 
  mod_pointer  



proxy front to modperl back with 1.3.24

2002-04-05 Thread ___cliff rayman___

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
 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 know they've made some mods to the
proxy module, including support for HTTP/1.1,
but i did not have time to research the exact
cause of the problem.

just a word of warning before someone
spends hours in frustration, or perhaps
someone can give me a tip if they've
solved this problem.

--
___cliff [EMAIL PROTECTED]http://www.genwax.com/