You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jeff Ambrosino <jb...@gmail.com> on 2006/09/07 18:43:42 UTC

[users@httpd] mod_proxy incorrectly decodes %2C when proxying URL to back-end?

We have a mod_proxy (2.0.54) front-end proxying to a back-end MS IIS
server.  One type of URL that we use is causing problems because
mod_proxy is decoding an encoded comma in the URL as it proxies the
request to the back-end (we determined this with a packet sniffer):

between browser and mod_proxy:

     http://www.company.com/item-01-A1263%7E23334%2Cz831%7E238.asp

between mod_proxy and back-end server:

     http://www.company.com/item-01-A1263%7E23334,z831%7E238.asp

As you can see, mod_proxy is decoding ONLY the comma (%2C), which is
causing our back-end server to return a 404.  Is there a workaround
for this in Apache?  I'm familiar with AllowEncodedSlashes (which we
also have set On), but it seems like there should be an
AllowEncodedCommas.

thanks for any help and guidance.

JB

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy incorrectly decodes %2C when proxying URL to back-end?

Posted by Jeff Ambrosino <jb...@gmail.com>.
We implemented a workaround to fix this problem.  Basically it
involves modifying modules/proxy/proxy_util.c to remove the comma from
the list of characters in each "allowed" variable declaration (~lines
136-145).  I'm not sure if this is likely to break anything else
(aside from the RFC 1738 spec ;), but it's working for us now.

JB


On 9/8/06, Robert Jaeschke <ja...@cs.uni-kassel.de> wrote:
> Hello Pid,
>
> Pid schrieb:
> [...]
> >>>between browser and mod_proxy:
> >>>
> >>>    http://www.company.com/item-01-A1263%7E23334%2Cz831%7E238.asp
> >>>
> >>>between mod_proxy and back-end server:
> >>>
> >>>    http://www.company.com/item-01-A1263%7E23334,z831%7E238.asp
> >>>
> >>>As you can see, mod_proxy is decoding ONLY the comma (%2C), which is
> >>>causing our back-end server to return a 404.  Is there a workaround
> >>>for this in Apache?  I'm familiar with AllowEncodedSlashes (which we
> >>>also have set On), but it seems like there should be an
> >>>AllowEncodedCommas.
> >>
> >>I posted something regarding this issue on 31.08.2006 with the subject
> >>"mod_proxy and unwanted decoding of URLs (related to bug 15207)" but I
> >>got no feedback. This behaviour breaks a lot of things and it's not
> >>only the problem with commas but also with other chars - see my post.
> >>
> > Search the archives, I seem to remember seeing a discussion about
> > something like this fairly recently.
>
> You're right, there were several posts addressing this (or similiar) issues:
>
> http://mail-archives.apache.org/mod_mbox/httpd-users/200312.mbox/%3CLaw15-F430AhIMix3VX00026154@hotmail.com%3E
> http://mail-archives.apache.org/mod_mbox/httpd-dev/200304.mbox/%3C20030427091312.GB28492@fermat.math.technion.ac.il%3E
> http://mail-archives.apache.org/mod_mbox//www-modproxy-dev/200406.mbox/%3C40DB166A.6030609@sharp.fm%3E
> http://mail-archives.apache.org/mod_mbox/httpd-users/200607.mbox/%3cD98EDC8DA509404185E74C0DFA2BF42D185133@sg1255z.corproot.net%3e
>
> I now understand why the decoding is done (caching, matching), but I'm
> missing either an option to re-encode the URL or to not decode it at
> all.
>
>
> Best regards,
> Robert
>
>
>
> --
> Robert Jäschke                                Tel: +49-(0)561-804-6253
> Universität Kassel                   E-Mail: jaeschke@cs.uni-kassel.de
> Wilhelmshöher Allee 73            WWW: http://www.kde.cs.uni-kassel.de
> 34121 Kassel >>>>>>>>>> Try  http://www.BibSonomy.org  now <<<<<<<<<<<
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy incorrectly decodes %2C when proxying URL to back-end?

Posted by Robert Jaeschke <ja...@cs.uni-kassel.de>.
Hello Pid,

Pid schrieb:
[...]
>>>between browser and mod_proxy:
>>>
>>>    http://www.company.com/item-01-A1263%7E23334%2Cz831%7E238.asp
>>>
>>>between mod_proxy and back-end server:
>>>
>>>    http://www.company.com/item-01-A1263%7E23334,z831%7E238.asp
>>>
>>>As you can see, mod_proxy is decoding ONLY the comma (%2C), which is
>>>causing our back-end server to return a 404.  Is there a workaround
>>>for this in Apache?  I'm familiar with AllowEncodedSlashes (which we
>>>also have set On), but it seems like there should be an
>>>AllowEncodedCommas.
>>
>>I posted something regarding this issue on 31.08.2006 with the subject
>>"mod_proxy and unwanted decoding of URLs (related to bug 15207)" but I
>>got no feedback. This behaviour breaks a lot of things and it's not
>>only the problem with commas but also with other chars - see my post.
>>
> Search the archives, I seem to remember seeing a discussion about
> something like this fairly recently.

You're right, there were several posts addressing this (or similiar) issues:

http://mail-archives.apache.org/mod_mbox/httpd-users/200312.mbox/%3CLaw15-F430AhIMix3VX00026154@hotmail.com%3E
http://mail-archives.apache.org/mod_mbox/httpd-dev/200304.mbox/%3C20030427091312.GB28492@fermat.math.technion.ac.il%3E
http://mail-archives.apache.org/mod_mbox//www-modproxy-dev/200406.mbox/%3C40DB166A.6030609@sharp.fm%3E
http://mail-archives.apache.org/mod_mbox/httpd-users/200607.mbox/%3cD98EDC8DA509404185E74C0DFA2BF42D185133@sg1255z.corproot.net%3e

I now understand why the decoding is done (caching, matching), but I'm
missing either an option to re-encode the URL or to not decode it at
all.


Best regards,
Robert



-- 
Robert Jäschke                                Tel: +49-(0)561-804-6253
Universität Kassel                   E-Mail: jaeschke@cs.uni-kassel.de
Wilhelmshöher Allee 73            WWW: http://www.kde.cs.uni-kassel.de
34121 Kassel >>>>>>>>>> Try  http://www.BibSonomy.org  now <<<<<<<<<<<

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy incorrectly decodes %2C when proxying URL to back-end?

Posted by Pid <p...@pidster.com>.
Search the archives, I seem to remember seeing a discussion about
something like this fairly recently.


Robert Jaeschke wrote:
> Hello Jeff,
> 
> Jeff Ambrosino schrieb:
>> We have a mod_proxy (2.0.54) front-end proxying to a back-end MS IIS
>> server.  One type of URL that we use is causing problems because
>> mod_proxy is decoding an encoded comma in the URL as it proxies the
>> request to the back-end (we determined this with a packet sniffer):
>>
>> between browser and mod_proxy:
>>
>>     http://www.company.com/item-01-A1263%7E23334%2Cz831%7E238.asp
>>
>> between mod_proxy and back-end server:
>>
>>     http://www.company.com/item-01-A1263%7E23334,z831%7E238.asp
>>
>> As you can see, mod_proxy is decoding ONLY the comma (%2C), which is
>> causing our back-end server to return a 404.  Is there a workaround
>> for this in Apache?  I'm familiar with AllowEncodedSlashes (which we
>> also have set On), but it seems like there should be an
>> AllowEncodedCommas.
> 
> 
> I posted something regarding this issue on 31.08.2006 with the subject
> "mod_proxy and unwanted decoding of URLs (related to bug 15207)" but I
> got no feedback. This behaviour breaks a lot of things and it's not
> only the problem with commas but also with other chars - see my post.
> 
> 
> 
> Best regards,
> Robert
> 
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy incorrectly decodes %2C when proxying URL to back-end?

Posted by Robert Jaeschke <ja...@cs.uni-kassel.de>.
Hello Jeff,

Jeff Ambrosino schrieb:
> We have a mod_proxy (2.0.54) front-end proxying to a back-end MS IIS
> server.  One type of URL that we use is causing problems because
> mod_proxy is decoding an encoded comma in the URL as it proxies the
> request to the back-end (we determined this with a packet sniffer):
> 
> between browser and mod_proxy:
> 
>     http://www.company.com/item-01-A1263%7E23334%2Cz831%7E238.asp
> 
> between mod_proxy and back-end server:
> 
>     http://www.company.com/item-01-A1263%7E23334,z831%7E238.asp
> 
> As you can see, mod_proxy is decoding ONLY the comma (%2C), which is
> causing our back-end server to return a 404.  Is there a workaround
> for this in Apache?  I'm familiar with AllowEncodedSlashes (which we
> also have set On), but it seems like there should be an
> AllowEncodedCommas.


I posted something regarding this issue on 31.08.2006 with the subject
"mod_proxy and unwanted decoding of URLs (related to bug 15207)" but I
got no feedback. This behaviour breaks a lot of things and it's not
only the problem with commas but also with other chars - see my post.



Best regards,
Robert


-- 
Robert Jäschke                                Tel: +49-(0)561-804-6253
Universität Kassel                   E-Mail: jaeschke@cs.uni-kassel.de
Wilhelmshöher Allee 73            WWW: http://www.kde.cs.uni-kassel.de
34121 Kassel >>>>>>>>>> Try  http://www.BibSonomy.org  now <<<<<<<<<<<

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org