Return-Path: Delivered-To: apache-bugdb-archive@hyperreal.org Received: (qmail 4221 invoked by uid 6000); 30 Aug 1999 15:20:12 -0000 Received: (qmail 4061 invoked by uid 2001); 30 Aug 1999 15:20:04 -0000 Received: (qmail 167 invoked by uid 2012); 30 Aug 1999 15:14:52 -0000 Message-Id: <19990830151452.165.qmail@hyperreal.org> Date: 30 Aug 1999 15:14:52 -0000 From: Rob Lindenbusch Reply-To: lfcrob@ai.org To: apbugs@hyperreal.org X-Send-Pr-Version: 3.2 Subject: general/4929: Rewrites using proxy option [P] drop QUERY-STRING Sender: apache-bugdb-owner@apache.org Precedence: bulk >Number: 4929 >Category: general >Synopsis: Rewrites using proxy option [P] drop QUERY-STRING >Confidential: no >Severity: critical >Priority: medium >Responsible: apache >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Mon Aug 30 08:20:02 PDT 1999 >Last-Modified: >Originator: lfcrob@ai.org >Organization: apache >Release: 1.3.9 >Environment: SunOS bart 5.6 Generic_105181-15 sun4u sparc SUNW,Ultra-2 - current patches gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release) >Description: Using the following rewrite rule: RewriteRule /web/servers/apache-bart/share/cgi-bin/foobar(.*)$ http://bart.ai.org/cgi-bin/rewrite$1 [P] The form (rewrite.html): Rewrite Bug Test
And the script (/cgi-bin/rewrite/print.perl): #! /usr/local/bin/perl print "Content-type: text/html\n\n"; if ($ENV{'REQUEST_METHOD'} eq "GET") { $in = $ENV{'QUERY_STRING'}; } elsif ($ENV{'REQUEST_METHOD'} eq "POST") { for ($i = 0; $i < $ENV{'CONTENT_LENGTH'}; $i++) { $in .= getc; } } print "Method: $ENV{'REQUEST_METHOD'}
\n"; print "In : $in
\n"; print "QUERY-STRING : $ENV{'QUERY_STRING'}
\n"; print "CONTENT_LENGTH : $ENV{'CONTENT_LENGTH'}
\n"; Under 1.3.9 the QUERY-STRING is absent when the script is called through the rewrite. Swapping out the 1.3.9 binary with 1.3.6 (no other changes) produces the correct results. When the script is called directly under 1.3.9, it functions correctly. There *may* also be a problem with the POST method. This does not seem to be present in this example, but rewrites of some POST operations from Solaris Apache 1.3.9 to an ASP script running under IIS4 show a similar loss of POST information. (Once again, behaviour is correct under 1.3.6). >How-To-Repeat: See above scripts/html >Fix: I have tried replacing the 1.3.9 mod_rewrite and mod_proxy with the versions from 1.3.6. The problem does not seem to go away, and it appears it may be somewhere else. >Audit-Trail: >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! ]