
bugzilla at apache
May 24, 2012, 2:00 AM
Post #1 of 1
(68 views)
Permalink
|
|
[Bug 53286] New: No longer supports rewriting HTTP CONNECT
|
|
https://issues.apache.org/bugzilla/show_bug.cgi?id=53286 Priority: P2 Bug ID: 53286 Assignee: bugs [at] httpd Summary: No longer supports rewriting HTTP CONNECT Severity: normal Classification: Unclassified OS: Linux Reporter: g.russell [at] napier Hardware: PC Status: NEW Version: 2.2.22 Component: mod_rewrite Product: Apache httpd-2 I moved from 2.2.21 to 2.2.22 on Fedora 15, and my mod_rewrite commands are no longer parsed when the request is the CONNECT method. It used to be possible and reasonably documented to be able to do rewrites like: RewriteCond %{REQUEST_METHOD} ^connect$ [NC] RewriteCond %{THE_REQUEST} !^connect\ tunnel-([^\ ]+)\.proxymachine\.net:([0-9]+)\ .*$ [NC] RewriteRule ^(.*)$ $1 [F,L] I use code like this to rewrite the uri to point to the tunnel endpoint from a RewriteMap file, and this has worked well for a few years. Even at logging level 9 nothing it produced in 2.2.22. Reverting the mod_rewrite module to 2.2.21 fixes the issue. Although not tested, I suspect httpd-2.2.22/modules/mappers/mod_rewrite.c at line 4268, which returns DECLINED if the uri[0] is not "/". However CONNECT is more likely to have the format "CONNECT the.machine.com:6000", and this contains no "/" characters. In fact attempting a CONNECT with a "/" gives an error very early on in the parse tree. I think the " r->uri[0] != '/' " test should have been guarded with a " r->method_number == M_CONNECT " test, but to be honest I have not tested this except in my head. Could we also add mod_rewrite parsing CONNECT as a regression test? It is so useful but perhaps there are only a few of us making use of it that it would take a while for someone to notice. Thanks. I hope this report was useful. And by the way thanks for all your efforts! Gordon. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: bugs-unsubscribe [at] httpd For additional commands, e-mail: bugs-help [at] httpd
|