RE: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-20 Thread GOMEZ Henri
: Wednesday, August 15, 2001 9:51 PM To: [EMAIL PROTECTED] Subject: Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix 1.3.17 (with negotiation_module removed to prevent that problem). - Original Message - From: [EMAIL PROTECTED] To: Bill Barker [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-15 Thread David Rees
On Tue, Aug 14, 2001 at 11:49:43PM -0400, Keith Wannamaker wrote: Try ap_escape_uri That does the trick. Here's the patch which gets things working again, thanks for all the help. Hopefully this will get applied soon. Is there any 3.2.4 release planned to fix the small number of

RE: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-15 Thread Keith Wannamaker
the solution is to choose one of the three at runtime by a mod_jk config option? Keith | -Original Message- | From: David Rees [mailto:[EMAIL PROTECTED]] | Sent: Wednesday, August 15, 2001 1:45 AM | To: [EMAIL PROTECTED] | Subject: Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-15 Thread Justin Erenkrantz
On Wed, Aug 15, 2001 at 08:56:45AM -0400, Keith Wannamaker wrote: I am concerned that the loss of original escaping will break somebody. For instance: As Costin pointed out, the escaping of a URI does not change its semantics - they should be treated as identical by anyone who follows the URI

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-15 Thread cmanolache
On Wed, 15 Aug 2001, Justin Erenkrantz wrote: On Wed, Aug 15, 2001 at 08:56:45AM -0400, Keith Wannamaker wrote: I am concerned that the loss of original escaping will break somebody. For instance: As Costin pointed out, the escaping of a URI does not change its semantics - they should

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-15 Thread Bill Barker
on IIS, it will show up. - Original Message - From: Justin Erenkrantz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 8:27 AM Subject: Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix On Wed, Aug 15, 2001 at 08:56:45AM -0400, Keith Wannamaker wrote: I am

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-15 Thread cmanolache
On Wed, 15 Aug 2001, Bill Barker wrote: Personally, I agree with Justin and Costin that mod_jk should be able to use the uri field. Having said that, I'd like to point out that the mod_jk.c in j-t-c is flat-out broken. It doesn't handle the case where the '?' itself is encoded. Since

Fw: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-15 Thread Bill Barker
- Original Message - From: Bill Barker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 12:15 PM Subject: Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix It is actually worse than that. TC3.3B1 (with the mod_jk that it ships with, I haven't tried j-t-c yet

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-15 Thread David Rees
On Wed, Aug 15, 2001 at 08:58:00AM -0700, [EMAIL PROTECTED] wrote: And, the whole question is what does Tomcat see the request as? I could make a case that it should never know about the unparsed_uri, but only the uri that httpd finally resolved to and that mod_jk picked up. -- justin

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-15 Thread cmanolache
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Bill Barker [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 11:44 AM Subject: Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix On Wed, 15 Aug 2001, Bill Barker wrote: Personally, I agree with Justin

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-15 Thread cmanolache
: Wednesday, August 15, 2001 11:44 AM Subject: Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix On Wed, 15 Aug 2001, Bill Barker wrote: Personally, I agree with Justin and Costin that mod_jk should be able to use the uri field. Having said that, I'd like to point out that the mod_jk.c

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-15 Thread Bill Barker
number at bottom ) Thanks, Costin - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Bill Barker [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 11:44 AM Subject: Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix On Wed, 15 Aug 2001, Bill Barker

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-15 Thread Bill Barker
1.3.17 (with negotiation_module removed to prevent that problem). - Original Message - From: [EMAIL PROTECTED] To: Bill Barker [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 1:01 PM Subject: Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix Apache2.0 + mod_jk

[TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread David Rees
Hi, I came across the need to use mod_rewrite to rewrite some URLs I was sending to Tomcat. After playing with it a bit (I had it working a while ago) and finding that Tomcat was not receiving the rewritten URLs no matter what I did, I took a look at the source to native/apache1.3/mod_jk.c.

RE: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread Keith Wannamaker
it instead of r-unparsed_uri. Keith | -Original Message- | From: David Rees [mailto:[EMAIL PROTECTED]] | Sent: Tuesday, August 14, 2001 9:13 PM | To: [EMAIL PROTECTED] | Subject: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix | | | Hi, | | I came across the need to use mod_rewrite

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread Justin Erenkrantz
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.cTue 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; -

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread David Rees
On Tue, Aug 14, 2001 at 10:20:26PM -0400, Keith Wannamaker wrote: Unfortunately there are people who were breaking because we didn't follow the spec. The better way to fix it is to create an inverse function for ap_parse_uri(request_rec *r, const char *uri) [http_protocol.c] in mod_jk...

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread Justin Erenkrantz
On Tue, Aug 14, 2001 at 10:20:26PM -0400, Keith Wannamaker wrote: Hi David, Unfortunately there are people who were breaking because we didn't follow the spec. The better way to fix it is to create an inverse function for ap_parse_uri(request_rec *r, const char *uri) [http_protocol.c]

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread Justin Erenkrantz
On Tue, Aug 14, 2001 at 07:25:32PM -0700, David Rees wrote: On Tue, Aug 14, 2001 at 10:20:26PM -0400, Keith Wannamaker wrote: Unfortunately there are people who were breaking because we didn't follow the spec. The better way to fix it is to create an inverse function for

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread Pier P. Fumagalli
Justin Erenkrantz at [EMAIL PROTECTED] wrote: I wonder how Pier is addressing this in mod_webapp. I'll have to look. -- justin Easy as 1.2.3... WARP has a concept of URI and QUERY STRING... Very separate things... All I do is req-ruri=apr_pstrdup(req-pool,r-uri);

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread Justin Erenkrantz
On Wed, Aug 15, 2001 at 03:41:30AM +0100, Pier P. Fumagalli wrote: Justin Erenkrantz at [EMAIL PROTECTED] wrote: I wonder how Pier is addressing this in mod_webapp. I'll have to look. -- justin Easy as 1.2.3... WARP has a concept of URI and QUERY STRING... Very separate things...

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread Pier P. Fumagalli
Justin Erenkrantz at [EMAIL PROTECTED] wrote: On Wed, Aug 15, 2001 at 03:41:30AM +0100, Pier P. Fumagalli wrote: Justin Erenkrantz at [EMAIL PROTECTED] wrote: I wonder how Pier is addressing this in mod_webapp. I'll have to look. -- justin Easy as 1.2.3... WARP has a concept of URI

RE: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread Keith Wannamaker
| 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. No, I don't believe this is quite right. getRequestURI() in a servlet should return r-unparsed_uri minus a query string. Setting

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread cmanolache
On Tue, 14 Aug 2001, Justin Erenkrantz wrote: Which, of course, is the right solution. Is it ? Re-escaping the URI will most likely generate something very different from the original, it's not symetrical. Getting a re-escaped request is different from the original, unescaped uri. That's the

RE: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread Keith Wannamaker
:[EMAIL PROTECTED]] | Sent: Tuesday, August 14, 2001 11:13 PM | To: [EMAIL PROTECTED] | Subject: Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix | | | On Tue, 14 Aug 2001, Justin Erenkrantz wrote: | | Which, of course, is the right solution. | | Is it ? Re-escaping the URI will most likely

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread cmanolache
You could just have: s-query_string = r-args; /* * The 2.2 servlet spec errata says the uri from * HttpServletRequest.getRequestURI() should remain encoded. * [http://java.sun.com/products/servlet/errata_042700.html] */ s-req_uri =

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread Justin Erenkrantz
On Tue, Aug 14, 2001 at 08:12:31PM -0700, [EMAIL PROTECTED] wrote: On Tue, 14 Aug 2001, Justin Erenkrantz wrote: Which, of course, is the right solution. Is it ? Re-escaping the URI will most likely generate something very different from the original, it's not symetrical. Getting a

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread Justin Erenkrantz
On Tue, Aug 14, 2001 at 11:13:34PM -0400, Keith Wannamaker wrote: Costin's right.. seems like the problem encountered was that there was no way to recreate the encoding (or lack thereof) on the original uri. So the kludge/solution was to use the unparsed uri and chop off the query string.

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread Craig R. McClanahan
On Tue, 14 Aug 2001, Justin Erenkrantz wrote: On Wed, Aug 15, 2001 at 03:41:30AM +0100, Pier P. Fumagalli wrote: Justin Erenkrantz at [EMAIL PROTECTED] wrote: I wonder how Pier is addressing this in mod_webapp. I'll have to look. -- justin Easy as 1.2.3... WARP has a

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread David Rees
On Tue, Aug 14, 2001 at 11:05:38PM -0400, Keith Wannamaker wrote: | 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. No, I don't believe this is quite right. getRequestURI() in

RE: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread Keith Wannamaker
Try ap_escape_uri Keith | | s-req_uri = ap_encode_uri(r-pool, r-uri); | | David, or anyone else interested too, would you | try this with some corner test cases and see if | it lives up to expectation? | | I gave it a shot and it compiled fine, but got this error at runtime: | |

Re: [TC3.2.3][PATCH] mod_jk / mod_rewrite bug fix

2001-08-14 Thread cmanolache
On Tue, 14 Aug 2001, Justin Erenkrantz wrote: mod_jk chops off the r-unparsed_uri itself without copying. Negative points for style. =-) -- justin That's true. However I'm not sure what else could we do - copy it once again to another buffer where we chop it ? It's not very much going on