tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Avi Avi" <gnion...@gmail.com>
Subject Re: mod_jk URL double decoding problem
Date Sun, 04 May 2008 14:13:01 GMT
Rainer,

Thanks a lot for the response.

I see similar results as yours in mod_jk.log. So it seems mod_jk is doing
the right thing and passing %25 unescaped.

The error is on the application side while reading the query param. Here is
the snippet:

2008-05-04 10:00:47,684 ERROR [orb.servlet.api] tracker doPost():
Exception=java.lang.IllegalArgumentException: URLDecoder: Illegal hex
characters in escape (%) pattern - For input string: "zz" :URLDecoder:
Illegal hex characters in escape (%) pattern - For input string: "zz"

Here is the request:
http://www.foo.com/bar?a=param_with_%25zz
(I put "zz" at the end to make sure that it wasn't something due to being
the last char.)

What is throwing me off is that the request works fine on port 8080. All I
am doing is calling request.getParameter().
I am not sure if it changes anything but I am using Jboss and not Tomcat.

Thanks again
Avi

On Sun, May 4, 2008 at 4:58 AM, Rainer Jung <rainer.jung@kippdata.de> wrote:

> Hi Avi,
>
> Avi Avi schrieb:
>
>  My question is regarding mod_jk/tomcat integration.
> > I am using Apache 2.0.54 and mod_jk 1.2.26.
> >
> > When I request the following url to my application, I get an HTTP 500
> > response (internal server error).
> > http://www.foo.com/bar?a=param_with_%25
> >
> > But if I send the request to jboss directly (port 8080), the above url
> > works.
> > So, I am pretty sure that this is a double decoding issue due to %25.
> >
> > I have tried this with all 3 jkOptions (ForwardURIProxy,
> > ForwardURICompatUnparsed, ForwardURIEscaped, ForwardURICompat)
> > and nothing seems to work.
> >
> > Am I missing something here ? Any help/tips will be greatly appreciated.
> >
>
> There no obvious problem about %25. When I try to send it, my mod_jk log
> contains (debug log level) something like:
>
> ajp_connection_tcp_send_message::jk_ajp_common.c (1011):
> 0220    2D 61 67 65 3D 30 00 A0 08 00 01 30 00 05 00 10  -
> -age=0.....0....
>
> A0 08: Content length following
> 00 01 30 00: content length is "0"
> 05: Query string following
> 00 10: length of query string is 16
>
> ajp_connection_tcp_send_message::jk_ajp_common.c (1011):
> 0230    61 3D 70 61 72 61 6D 5F 77 69 74 68 5F 25 32 35  -
> a=param_with_%25
>
> 16 Bytes with query string "a=param_with_%25"
>
> ajp_connection_tcp_send_message::jk_ajp_common.c (1011):
> 0240    00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00  -
> ................
>
> followed by a terminating "00" and "ff" (request terminator).
>
> ajp_send_request::jk_ajp_common.c (1489): (ajp13) request body to send 0 -
> request body to resend 0
>
> Can you also see your request string including the "%25" in such a way in
> the debug log?
>
>
> > Thanks
> > Avi
> >
>
> Can you see, where error 500 comes from (Tomcat or httpd)?
>
> What does your tomcat access log contain, if you enable it in server.xml?
> Does it show the correct request line?
>
> How does you URL realy look like (is %25 really in the query string and is
> it really the last part of it)?
>
> Please use the default settings for JkOptions (no option at all) for
> testing.
>
> Regards,
>
> Rainer
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message