On Tue, Aug 14, 2001 at 06:13:24PM -0700, David Rees wrote:
> --- mod_jk.c.orig Tue Aug 14 17:58:21 2001
> +++ mod_jk.c Tue Aug 14 18:04:58 2001
> @@ -358,7 +358,7 @@
> s->method = (char *)r->method;
> s->content_length = get_content_length(r);
> s->query_string = r->args;
> - s->req_uri = r->unparsed_uri;
> + s->req_uri = r->uri;
> if (s->req_uri != NULL) {
> char *query_str = strchr(s->req_uri, '?');
> if (query_str != NULL) {
>
> After this change my URLs were getting rewritten as expected again.
>
> Can we apply this change to the tree if there's nothing wrong with it for
> the next release? This problem has affected a large number of users, just
> take a look at the tomcat-dev/user archives.
This breaks query strings.
r->uri contains only the path portion of the URL. r->unparsed_uri
contains the URL in its "virgin" format - as sent by the client.
You can see that mod_jk is looking for the query string (look at the
strchr two lines down) - it won't be there in the r->uri. You now
need to modify mod_jk to look at r->args.
But, if you need access to the encoded URI (which is what the comment
above that line in the j-t-c version of mod_jk seems to indicate), the
only way to do it in httpd is to do with unparsed_uri. All of the
other parameters (i.e. r->uri) have been escaped already.
I'm not sure what the solution is. But, this one kills off query
strings to servlets. That's even worse than losing internal rewrite
capabilities.
I wonder how Pier is addressing this in mod_webapp. I'll have to
look. -- justin