There is also a bug in 3.3 ( where URI is also decoded ),
I'm working on it - should be ready this weekend.
( I'm also working on the " " bug, it has the most votes so far )
Costin
On Fri, 18 May 2001, Keith Wannamaker wrote:
> The 2.2 servlet spec errata says the uri from
> HttpServletRequest.getRequestURI() should remain encoded.
> [http://java.sun.com/products/servlet/errata_042700.html]
>
> Tomcat 3.2 standalone handles this correctly, but the
> mod_jk connector does not.
>
> The connector uses the decoded uri from Apache (r->uri).
> I believe the correct value to return is the raw, encoded
> url (r->unparsed_uri), stripped of the query string, per
> the servlet javadoc.
> [http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/HttpSer
> vletRequest.html#getRequestURI()]
>
> Of course I will defer to the RM's judgement, but I'd like
> to commit the following patch to the 3.2 branch prior to
> next Friday:
>
> ===================================================================
> RCS file: /home/cvs/jakarta-tomcat/src/native/apache1.3/Attic/mod_jk.c,v
> retrieving revision 1.7.2.3
> diff -u -r1.7.2.3 mod_jk.c
> --- mod_jk.c 2001/02/17 05:24:00 1.7.2.3
> +++ mod_jk.c 2001/05/18 21:05:16
> @@ -358,7 +358,13 @@
> s->method = (char *)r->method;
> s->content_length = get_content_length(r);
> s->query_string = r->args;
> - s->req_uri = r->uri;
> + s->req_uri = r->unparsed_uri;
> + if (s->req_uri != NULL) {
> + char *query_str = strchr(s->req_uri, '?');
> + if (query_str != NULL) {
> + *query_str = 0;
> + }
> + }
>
> s->is_ssl = JK_FALSE;
> s->ssl_cert = NULL;
>
> Ditto for /home/cvs/jakarta-tomcat/src/native/apache2.0/Attic/mod_jk.c
>
> Comments?
>
> Keith
>