Received: (qmail 6700 invoked by uid 501); 30 Jan 2002 15:02:02 -0000 Message-Id: <20020130150202.6699.qmail@apache.org> Date: 30 Jan 2002 15:02:02 -0000 From: Ricardo Capurro Reply-To: RicardoCapurro@yahoo.com To: submit@bugz.apache.org Subject: mod_proxy fails when using as a reverse proxy X-Send-Pr-Version: 3.110 >Number: 9652 >Category: mod_proxy >Synopsis: mod_proxy fails when using as a reverse proxy >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: feedback >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Wed Jan 30 07:10:00 PST 2002 >Closed-Date: >Last-Modified: Tue Mar 26 05:59:45 PST 2002 >Originator: RicardoCapurro@yahoo.com >Release: 2.0.28 Beta >Organization: >Environment: I am using Apache 2.0.28 beta built on Nov 12 2001 running on Windows NT 4.0. I download and install a binary apache_2_0_28-beta-win32-x86-no_ssl.msi from apache.org. >Description: I have installed Apache 2 on Windows NT 4.0 Then I configure httpd.conf this way I uncommented the following lines LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/proxy_http.so Then appended this lines at the end ProxyPass /cgi http://localhost/cgi-bin ProxyPassReverse /cgi http://localhost/cgi-bin ProxyPass /CGI/ http://localhost/cgi-bin/ ProxyPassReverse /CGI/ http://localhost/cgi-bin/ Then I created this cgi script in perl in .../cgi-bin named Clock.pl #!E:\Perl\bin\perl.exe -w #!/usr/local/bin/perl -w my $TOUT = 20; $| = 1; print "Content-Type: text/html\n\n"; print <<"END_HTML"; Richard's Clock

00:00:00

END_HTML for ( my $i = 0; $i < $TOUT; ++$i ) { my ( $SS, $MM, $HH ) = localtime(); $SS =~ s/^(.)$/0$1/; $MM =~ s/^(.)$/0$1/; $HH =~ s/^(.)$/0$1/; print <<"END_HTML"; $SS END_HTML sleep( 1 ); } print <<"END_HTML"; END_HTML exit( 0 ); Then I point my browser to http://localhost/cgi-bin/Clock.pl and it works !!! But when I point my browser to http://localhost/cgi/Clock.pl it doesn't work, I think that is because its trying to proxy to http://localhost/cgi-binn/Clock.pl instead of http://localhost/cgi-bin/Clock.pl !!! But if I try pointing to http://localhost/CGI/Clock.pl it seema as it works, but then we discover another bug, because mod_proxy starts introducing garbage in the response to the browser. The first bug doesn't happened in Apache 1.3.x. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: State-Changed-From-To: open-feedback State-Changed-By: jim State-Changed-When: Tue Mar 26 05:59:44 PST 2002 State-Changed-Why: I cannot recreate this error with the latest CVS. Please retry with 2.0.32 (at least) to see if the error still exists for you. There have been changes in the proxy code since .28. >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database 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! ]