httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Kahan <>
Subject [bug + naive patch] mod_negotiation + query parameters
Date Tue, 25 Sep 2007 13:49:37 GMT

This is a bug similar to PR 33112 which was fixed in 2.2.6.

Query strings are not being passed along when mod_negotiation
combines  multiviews with typemap processing.

The guilty party is the call to 

   ap_internal_fast_redirect(sub_req, r)

in mod_negotiation.c:handle_multi() which discards the 
previously parsed args and path_info. That info is 
not regenerated again. I'm including a very naive patch 
against 2.2.6 that fixes this.  I'm sure there is a 
better way to fix it, but need more of your guidance 
to achieve it in an optimal way.

Here's a test scenario to show this bug. Please adjust accordingly
to your server setup. I assume the use of php
for printing out the query parameters; you could use
perl or a shell script too):

1. In a directory, put the three files that I've attached:
   test.html, test.php, test.var

2. query the server for test.php?q=3  

    ==> you'll see that the query parameters are correctly
        passed to the script.

3. query the server for test?q=3


    ==> in this case, the query parameters have been discarded
        by mod_negotiation's call to 
        ap_internal_fast_redirect inside handle_multi().

You'll see that my naive solution is to make a backup copy of
args and path_info, if they existed, before the call to 
ap_internal_fast_redirect(), and then restoring them. This
effectively solves the bug. I don't know if there's a better
way to do this.



View raw message