Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Dev

PATCH <PR-24329>] - mod_rewrite and CONNECT requests

 

 

Apache dev RSS feed   Index | Next | Previous | View Threaded


billz at consultla

Oct 5, 2009, 12:23 PM

Post #1 of 2 (129 views)
Permalink
PATCH <PR-24329>] - mod_rewrite and CONNECT requests

I hope someone from the official dev team can merge this into the next
release of apache httpd.

Please find attached an svn diff made against revision 820823 of:
http://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c

This diff fixes the Bug 29744 on the Bugzilla:
Bug: https://issues.apache.org/bugzilla/show_bug.cgi?id=47928
Patch: https://issues.apache.org/bugzilla/attachment.cgi?id=24329

This fix allows mod_rewrite to handle CONNECT requests (by not trying to
fully qualify the substitution string).
The current behavior is that mod_rewrite tries to connect to
http[s]://ourhost[:ourport]/host:port.

I checked with the RFC (http://www.ietf.org/rfc/rfc2817.txt):
A CONNECT method requests that a proxy establish a tunnel connection
on its behalf. The Request-URI portion of the Request-Line is always
an 'authority' as defined by URI Generic Syntax [2], which is to say
the host name and port number destination of the requested connection
separated by a colon:

CONNECT server.example.com:80 HTTP/1.1
Host: server.example.com:80
This patch will allow a CONNECT request to simply connect to the host:port
specified in the substitution string of the rewrite rule.

Hopefully this is enough detail to help.

Thank you,
BillZ
Attachments: mod_rewrite.c.unified.diff.patch (0.38 KB)


billz at consultla

Oct 6, 2009, 8:51 AM

Post #2 of 2 (105 views)
Permalink
Re: PATCH <PR-24329>] - mod_rewrite and CONNECT requests [In reply to]

Thank you for committing this to the trunk. Is there any chance of getting
this added to 2.2.x also?
Thanks again,
BillZ

On Mon, Oct 5, 2009 at 12:23 PM, Bill Zajac <billz[at]consultla.com> wrote:

> I hope someone from the official dev team can merge this into the next
> release of apache httpd.
>
> Please find attached an svn diff made against revision 820823 of:
>
> http://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c
>
> This diff fixes the Bug 29744 on the Bugzilla:
> Bug: https://issues.apache.org/bugzilla/show_bug.cgi?id=47928
> Patch: https://issues.apache.org/bugzilla/attachment.cgi?id=24329
>
> This fix allows mod_rewrite to handle CONNECT requests (by not trying to
> fully qualify the substitution string).
> The current behavior is that mod_rewrite tries to connect to
> http[s]://ourhost[:ourport]/host:port.
>
> I checked with the RFC (http://www.ietf.org/rfc/rfc2817.txt):
> A CONNECT method requests that a proxy establish a tunnel connection
> on its behalf. The Request-URI portion of the Request-Line is always
> an 'authority' as defined by URI Generic Syntax [2], which is to say
> the host name and port number destination of the requested connection
> separated by a colon:
>
> CONNECT server.example.com:80 HTTP/1.1
> Host: server.example.com:80
> This patch will allow a CONNECT request to simply connect to the host:port
> specified in the substitution string of the rewrite rule.
>
> Hopefully this is enough detail to help.
>
> Thank you,
> BillZ
>

Apache dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.