The query string is not preserved when returning the negotiated file causing CGI scripts to miss all request variables. Here is a fix: --- httpd-2.0.52/modules/mappers/mod_negotiation.c 2004-02-09 21:53:18. 000000000 +0100 +++ httpd-2.0.52j/modules/mappers/mod_negotiation.c 2005-01-15 13:47:20. 095964578 +0100 @@ -2938,7 +2938,7 @@ udir = ap_make_dirstr_parent(r->pool, r->uri); udir = ap_escape_uri(r->pool, udir); ap_internal_redirect(apr_pstrcat(r->pool, udir, best->file_name, - r->path_info, NULL), r); + r->path_info, "?", r->args, NULL), r); return OK; } @@ -2991,6 +2991,7 @@ goto return_from_multi; } } + if ((r->args != NULL) && ( sub_req->args == NULL)) sub_req->args = apr_pstrdup(r->pool, r->args); /* keep query_string */ /* now do a "fast redirect" ... promotes the sub_req into the main req */ ap_internal_fast_redirect(sub_req, r);
Also present in 2.2.4.
Fixed in trunk: http://svn.apache.org/viewvc?view=rev&revision=565671
It's probably irrelevant now, but I've applied and tested the patch in 2.2.4. Works fine.
Fixed for 2.2.6.
This part has disappeared from mod_negotiation.c + if ((r->args != NULL) && ( sub_req->args == NULL)) sub_req->args = apr_pstrdup(r->pool, r->args); /* keep query_string */ Please, enter it.
(In reply to comment #5) > This part has disappeared from mod_negotiation.c > > + if ((r->args != NULL) && ( sub_req->args == NULL)) sub_req->args = > apr_pstrdup(r->pool, r->args); /* keep query_string */ > > Please, enter it. > It was never in the code as the bug was fixed differently (see http://svn.apache.org/viewvc?view=rev&revision=565671 and http://svn.eu.apache.org/viewvc?view=rev&revision=570450) . Unless the problem still occurs for you please leave this bug closed.
Please, don't close bugs, you haven't tested ! Why do you think I have reopened this bug ?! I have added the missing line and now it is working. It is not working as released in 2.2.9
I've just "rediscovered" the issue in 2.2.4. I upgraded to 2.2.11, and that solved problem for me.
I also couldn't reproduce with recent 2.2.x, please provide a detailed report against 2.2.6 or later if re-opening.
I have also checked 2.2.11 and the problem has been fixed. Looking at the fixed issues in 2.2.10 in 2.2.11 I suspect, that this somehow was the causing the problem i.e. same symptom, but in another module. Bug 45247 - query string not preserved with [proxy, noescape]
Apparently this bug will not fully die. I still have to add this line in 2.2.13 if ((r->args != NULL) && ( sub_req->args == NULL)) sub_req->args = apr_pstrdup(r->pool, r->args); /* keep query_string JTH */ at line 3134 in mod_negotiation.c Without this line this will not work (params not recognized) http://jth.net/index?scroll=yes&ramme=./domchange.da.php [QUERY_STRING] => [REQUEST_URI] => /index?scroll=yes&ramme=./domchange.da.php but http://jth.net/index.var?scroll=yes&ramme=./domchange.da.php [QUERY_STRING] => scroll=yes&ramme=./domchange.da.php [REQUEST_URI] => /index?scroll=yes&ramme=./domchange.da.php [REDIRECT_URL_COUNT_DINDEX] => index1.php index.var index.da.php index.php index.html index.htm index.shtml index.cgi index.html.da index.html.en index will. index.var contains URI: index URI: index.da.php Content-type: text/html URI: index.en.php Content-type: text/html Content-language: en, de, fr URI: index.nl.php Content-type: text/html Content-language: nl URI: index.da.php Content-type: text/html Content-language: da, sv, no, fo, is
Still not solved in 2.2.14
OK, you have a scenario where mod_negotiation runs twice: first to resolve multiviews, then to resolve a type map. I am able to reproduce what you describe in Comment 11. So the conclusion is: the same bug appeared in both handlers. I fixed one ( Comment 2 ) and thought from the comments (including Comment 10 from you) all was well - hence the confusion. Looks like your fix will do the job, and we can dispense with the copy so it's virtually overhead-free. Applied now in r915407 .
*** Bug 43550 has been marked as a duplicate of this bug. ***
The patch in r915407 has been backported to 2.2 as r917017 and is part of the released version 2.2.15.
The patch has also been backported to 2.0 as revision r1004972 and will be part of version 2.0.64 and beyond once it gets released.