logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Change in proxy or rewrite behavior between 2.2.8 and 2.2.9?
Author
Matt Grossman



Joined: 18 Jun 2008
Posts: 3

PostPosted: Wed 18 Jun '08 3:00    Post subject: Change in proxy or rewrite behavior between 2.2.8 and 2.2.9? Reply with quote

Hi all,

I have noticed a change in mod_rewrite or mod_proxy behavior between previous versions and 2.2.9. This is running on win2k3, 32 bit, built with VC++ 2005. I see in the release notes that there were changes to these modules, but it doesn't look to me like they are relevant to what I am seeing.

I have apache set up to reverse proxy to an app server with this rewrite rule (IPs x'd out):

RewriteRule ^/mhui/$ http://xxx.xxx.xxx.xxx:9000/mhui/controller\?action=LOGIN [proxy,nocase,noescape,last]

With 2.2.8 this works fine, but with 2.2.9 the ?action=LOGIN is not being forwarded to the app server.

I see this in my rewrite log with both 2.2.8 and 2.2.9:

xxx.xxx.xxx.xxx - - [18/Jun/2008:00:50:34 +0000] [xxx.xxx.xxx.xxx/sid#8ccb20][rid#cda3a0/initial] (2) rewrite '/mhui/' -> 'http://xxx.xxx.xxx.xxx:9000/mhui/controller?action=LOGIN'
xxx.xxx.xxx.xxx - - [18/Jun/2008:00:50:34 +0000] [xxx.xxx.xxx.xxx/sid#8ccb20][rid#cda3a0/initial] (3) split uri=http://xxx.xxx.xxx.xxx:9000/mhui/controller?action=LOGIN -> uri=http://xxx.xxx.xxx.xxx:9000/mhui/controller, args=action=LOGIN
xxx.xxx.xxx.xxx - - [18/Jun/2008:00:50:34 +0000] [xxx.xxx.xxx.xxx/sid#8ccb20][rid#cda3a0/initial] (2) forcing proxy-throughput with http://xxx.xxx.xxx.xxx:9000/mhui/controller
xxx.xxx.xxx.xxx - - [18/Jun/2008:00:50:34 +0000] [xxx.xxx.xxx.xxx/sid#8ccb20][rid#cda3a0/initial] (1) go-ahead with proxy request proxy:http://xxx.xxx.xxx.xxx:9000/mhui/controller [OK]

Has anyone else seen this behavior?
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Wed 18 Jun '08 20:42    Post subject: Reply with quote

Definitely a bug, caused by this change to mod_proxy.

I think the mod_proxy change is correct, but mod_rewrite needs a corresponding change to go with it.
I will dig a little deeper in a day or two.

-tom-
Back to top
Matt Grossman



Joined: 18 Jun 2008
Posts: 3

PostPosted: Thu 19 Jun '08 3:11    Post subject: Reply with quote

Thanks. Please let me know what you find.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Fri 20 Jun '08 15:51    Post subject: Reply with quote

I tried a change to mod_rewrite (2.2.9 VC++ 2005) which works for me.

It is at http://people.apache.org/~tdonovan/mod_rewrite_fix.zip <=== EDIT: download removed

This contains a patch to mod_rewrite.c, a mod_rewrite.c source file updated with this patch, and a mod_rewrite.so binary built with VC++ 2005 (aka VC8).

Let me know if it works for you.
If it does, I'll check it into the trunk and propose it for a backport to Apache 2.2.

-tom-


Last edited by tdonovan on Fri 20 Jun '08 23:53; edited 2 times in total
Back to top
Matt Grossman



Joined: 18 Jun 2008
Posts: 3

PostPosted: Fri 20 Jun '08 22:15    Post subject: Reply with quote

I applied the patch and recompiled 2.2.9. It now works correctly with our rewrite rules. Thanks.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Fri 20 Jun '08 23:38    Post subject: Reply with quote

No problem Matt.

I opened a new bug for Apache 2.2.9 and I fixed this in the httpd trunk - so the bug is marked "resolved".

I also proposed the fix for backporting to the 2.2 branch so it will get into 2.2.10.
It needs a couple of other developer votes before it can be backported.

If we get close to 2.2.10 and this isn't done yet, could you bring it up on the dev@httpd.apache.org mailing list?
Adding a vote to bug 45247 wouldn't hurt either.

-tom-
Back to top


Reply to topic   Topic: Change in proxy or rewrite behavior between 2.2.8 and 2.2.9? View previous topic :: View next topic
Post new topic   Forum Index -> Apache