You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2007/10/04 15:52:59 UTC
DO NOT REPLY [Bug 43550] New: - mod_negotiation is not passing query strings when using typemaps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43550>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43550
Summary: mod_negotiation is not passing query strings when using
typemaps
Product: Apache httpd-2
Version: 2.2.6
Platform: All
OS/Version: Linux
Status: NEW
Severity: regression
Priority: P2
Component: mod_negotiation
AssignedTo: bugs@httpd.apache.org
ReportedBy: jose@w3.org
Query strings are not being passed along when mod_negotiation
combines multiviews with typemap processing. This is a regression
compared to the behavior we had on Apache 1.3.x. It is complementary
to PR 33112, which fixed a similar problem, but in a different part
of the same module.
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 and trunk that fixes this. I'm sure there is a
better way to fix it, but need more guidance
to achieve it in an optimal way.
I'm also submitting a new test for the perl-framework test procedure
that tests this behavior, to avoid having this regression in next
versions.
== Reproducing the bug ==
You can use either use the new test I'm submitting or use the following
scenario. Please adjust accordingly
to your server setup. I assume the use of php
for printing out the query parameters; you could use
perl (like my test procedure contribution does) 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
http://localhost/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
http://localhost/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.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 43550] - mod_negotiation is not passing query strings and path info when using typemaps
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43550>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43550
------- Additional Comments From jorton@redhat.com 2007-10-29 08:06 -------
Test case added in http://svn.apache.org/viewvc?view=rev&revision=589666 - thanks!
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 43550] - mod_negotiation is not passing query strings when using typemaps
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43550>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43550
------- Additional Comments From jose@w3.org 2007-10-04 07:02 -------
Created an attachment (id=20917)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=20917&action=view)
New test procedure for perl-framework for testing typemaps and query string
parameters
DESCRIPTION
The following tests checks that query string parameters are being
correctly passed-on whenever a resource is selected by means
of a type-map.
CONTENT
This test has been prepared using the svn trunk version of httpd-test
and is comprised of:
1. Test htdocs directory:
httpd-test/perl-framework/t/htdocs/modules/negotiation/ \
typemap_query_string
|
- test.html
|
- test.pl
|
- test.var
2. Patches to both t/conf/extra.conf.in and t/modules/negotiation.t
to include the new test
typemaptest.diff
INSTALLATION
1. Check out the httpd-test directory
svn checkout http://svn.apache.org/repos/asf/httpd/test/trunk/ \
httpd-test
2. Install the
htdocs/modules/negotiation/typemap_query_string/ directory
and files.
tar -xzf typemapqstest.tgz
3. Patch extra.conf.in and negotiation.t to include the new test
patch -p0 <typemaptest.diff
DESCRIPTION OF THE TEST
The test consists in requesting the following resource:
http://server/..../typemap_query_string/test?foo
If the query string parameter is being passed correctly, test.pl will
be called and will return the string
QUERY_STRING --> foo
RUNNING THE TEST
t/TEST modules/negotiation
The new test has number #99.
Note that this test will fail unless you apply the patch to
mod_negotiation which is included in my report.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 43550] - mod_negotiation is not passing query strings when using typemaps
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43550>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43550
jose@w3.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #20915|0 |1
is obsolete| |
------- Additional Comments From jose@w3.org 2007-10-11 14:19 -------
Created an attachment (id=20962)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=20962&action=view)
Query string were not being handled to resources handled by typemaps
When preparing my patch for submission, I a typo which caused a sigsev. Here's
the correct patch.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 43550] - mod_negotiation is not passing query strings when using typemaps
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43550>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43550
------- Additional Comments From jose@w3.org 2007-10-04 06:56 -------
Created an attachment (id=20915)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=20915&action=view)
Patch against 2.2.6
Typemap handling didn't pass the query string and path_info parameters
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 43550] - mod_negotiation is not passing query strings and path info when using typemaps
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43550>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43550
jose@w3.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|mod_negotiation is not |mod_negotiation is not
|passing query strings when |passing query strings and
|using typemaps |path info when using
| |typemaps
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 43550] - mod_negotiation is not passing query strings when using typemaps
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43550>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43550
------- Additional Comments From jose@w3.org 2007-10-04 06:56 -------
Created an attachment (id=20916)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=20916&action=view)
Patch against trunk
Typemap handling didn't pass the query string and path_info parameters.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 43550] - mod_negotiation is not passing query strings and path info when using typemaps
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43550>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43550
jose@w3.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |PatchAvailable
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 43550] - mod_negotiation is not passing query strings when using typemaps
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43550>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43550
jose@w3.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #20962|Query string were not being|Query string were not being
description|handled to resources handled|handled to resources handled
|by typemaps |by typemaps (2.2.6 patch)
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 43550] - mod_negotiation is not passing query strings when using typemaps
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43550>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43550
jose@w3.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #20916|0 |1
is obsolete| |
------- Additional Comments From jose@w3.org 2007-10-11 14:21 -------
Created an attachment (id=20963)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=20963&action=view)
Query string were not being handled to resources handled by typemaps (trunk
patch)
When preparing my patch for submission, I a typo which caused a sigsev.
Here's the correct patch.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org