RE: [PATCH] forward instead of redirect for welcome files

2003-02-20 Thread travis
I would like to revisit this thread: http://www.mail-archive.com/tomcat-dev@jakarta.apache.org/msg38851.html This should be a required feature. The current functionality is a BIG flaw in my eyes and obviously many other peoples for many reasons including: - it is not the standard way that

RE: [PATCH] forward instead of redirect for welcome files

2003-02-20 Thread Shapira, Yoav
Howdy, While I don't particularly care for this particular thread (and thus don't mind the patch either way), I did point want to make a couple of comments: This should be a required feature. Let's be very clear on what's required and what's not. Per SRV.9.10, Welcome Files, and specifically

RE: RE: [PATCH] forward instead of redirect for welcome files

2003-02-20 Thread travis
instead of redirect for welcome files Howdy, While I don't particularly care for this particular thread (and thus don't mind the patch either way), I did point want to make a couple of comments: This should be a required feature. Let's be very clear on what's required and what's not. Per SRV

RE: [PATCH] forward instead of redirect for welcome files

2003-02-20 Thread Jan Grant
On Thu, 20 Feb 2003, Shapira, Yoav wrote: Howdy, While I don't particularly care for this particular thread (and thus don't mind the patch either way), I did point want to make a couple of comments: This should be a required feature. Let's be very clear on what's required and what's not.

Re: [PATCH] forward instead of redirect for welcome files

2003-01-08 Thread Jan Grant
On 7 Jan 2003, Matt Parker wrote: On Tue, 2003-01-07 at 04:40, Remy Maucherat wrote: I'll -1 this patch unless the new behavior is made optional (and default to the current behavior). Remy Okay, it's now an init param which defaults to false. Following are DefaultServlet.java and

Re: [PATCH] forward instead of redirect for welcome files

2003-01-07 Thread Remy Maucherat
Matt Parker wrote: If you want to mirror what Apache HTTPD does: No slash present -- append slash (only!) and redirect Slash present -- internally forward to welcome-file page Well, here's the rub: - The new servlet spec clearly states that either /foo or /foo/ should return a welcome-file

Re: [PATCH] forward instead of redirect for welcome files

2003-01-07 Thread Remy Maucherat
Matt Parker wrote: Here's the new version of the patch. the code to redirect if there is no trailing slash remains untouched, but it now forwards if there is a trailing slash. i've included more context to avoid potential confusion: I'll -1 this patch unless the new behavior is made optional

Re: [PATCH] forward instead of redirect for welcome files

2003-01-07 Thread Matt Parker
On Tue, 2003-01-07 at 04:40, Remy Maucherat wrote: I'll -1 this patch unless the new behavior is made optional (and default to the current behavior). Remy Okay, it's now an init param which defaults to false. Following are DefaultServlet.java and web.xml patches. ---

Re: [PATCH] forward instead of redirect for welcome files

2003-01-07 Thread Matt Parker
On Tue, 2003-01-07 at 04:39, Remy Maucherat wrote: Matt Parker wrote: If you want to mirror what Apache HTTPD does: No slash present -- append slash (only!) and redirect Slash present -- internally forward to welcome-file page Well, here's the rub: - The new servlet spec

Re: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Hans Bergsten
Matt Parker wrote: I'd like to suggest that catalina perform a forward, rather than a redirect, for requests that end with '/'. With a redirect, special configuration is necessary for proxy servers to work correctly. Also, a forward doesn't require an additional round trip to the client--a

Re: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Matt Parker
On Mon, 2003-01-06 at 12:14, Hans Bergsten wrote: Matt Parker wrote: I'd like to suggest that catalina perform a forward, rather than a redirect, for requests that end with '/'. With a redirect, special configuration is necessary for proxy servers to work correctly. Also, a forward

Re: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Costin Manolache
Matt Parker wrote: On Mon, 2003-01-06 at 12:14, Hans Bergsten wrote: Matt Parker wrote: I'd like to suggest that catalina perform a forward, rather than a redirect, for requests that end with '/'. With a redirect, special configuration is necessary for proxy servers to work correctly.

Re: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Matt Parker
On Mon, 2003-01-06 at 12:57, Costin Manolache wrote: The problem is that once again the servlet spec defines a behavior that is different from the common practices on web servers. I don't see that this particular behavior is actually specified, unless I'm looking in the wrong place. I think

Re: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Hans Bergsten
Matt Parker wrote: On Mon, 2003-01-06 at 12:14, Hans Bergsten wrote: Matt Parker wrote: I'd like to suggest that catalina perform a forward, rather than a redirect, for requests that end with '/'. With a redirect, special configuration is necessary for proxy servers to work correctly. Also, a

Re: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Costin Manolache
Matt Parker wrote: The welcome-file-list can include more than index.html - you may have foo/index.html, etc ( i.e. things in other dirs ). That means #anchors would break if we don't do redirect. This argument would apply equally to Apache's current implementation. You can specify

Re: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Matt Parker
On Mon, 2003-01-06 at 14:43, Hans Bergsten wrote: Okay, that's different. Maybe I misread your patch, but to me it looked as if you changed the behavior when there's no trailing slash. Actually my patch is forwarding under both circumstances, but according to SRV.9.10 of Servlet 2.4, this is

Re: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Costin Manolache
Matt Parker wrote: On Mon, 2003-01-06 at 14:43, Hans Bergsten wrote: Okay, that's different. Maybe I misread your patch, but to me it looked as if you changed the behavior when there's no trailing slash. Actually my patch is forwarding under both circumstances, but according to SRV.9.10 of

Re: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Tim Funk
If a trailing / is not present, then performing a RequestDispatcher.forward will break all relative references (for the web browser) -Tim Costin Manolache wrote: Matt Parker wrote: On Mon, 2003-01-06 at 14:43, Hans Bergsten wrote: Okay, that's different. Maybe I misread your patch, but to

Re: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Matt Parker
On Mon, 2003-01-06 at 17:03, Tim Funk wrote: If a trailing / is not present, then performing a RequestDispatcher.forward will break all relative references (for the web browser) -Tim It doesn't forward until after it appends the trailing slash, so I think it's okay on that front. --

Re: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Matt Parker
On Mon, 2003-01-06 at 15:28, Costin Manolache wrote: Matt Parker wrote: On Mon, 2003-01-06 at 14:43, Hans Bergsten wrote: Okay, that's different. Maybe I misread your patch, but to me it looked as if you changed the behavior when there's no trailing slash. Actually my patch is

Re: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Matt Parker
Verified the following: http://foo/bar#anchor http://foo/bar/#anchor with a welcome-file of: test/test.jsp and was correctly forwarded to: http://foo/bar/test/test.jsp#anchor okay, I was a little premature (no jokes please). if the welcome file itself has a relative link off

Re: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Matt Parker
On Mon, 2003-01-06 at 17:11, Matt Parker wrote: On Mon, 2003-01-06 at 17:03, Tim Funk wrote: If a trailing / is not present, then performing a RequestDispatcher.forward will break all relative references (for the web browser) -Tim It doesn't forward until after it appends the

RE: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Tim Moore
-Original Message- From: Matt Parker [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 7:39 PM To: Tomcat Developers List Subject: Re: [PATCH] forward instead of redirect for welcome files Verified the following: http://foo/bar#anchor http://foo/bar/#anchor

RE: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Matt Parker
If you want to mirror what Apache HTTPD does: No slash present -- append slash (only!) and redirect Slash present -- internally forward to welcome-file page Well, here's the rub: - The new servlet spec clearly states that either /foo or /foo/ should return a welcome-file (if specified) -

RE: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Matt Parker
Here's the new version of the patch. the code to redirect if there is no trailing slash remains untouched, but it now forwards if there is a trailing slash. i've included more context to avoid potential confusion: --- DefaultServlet.java 2003-01-03 16:20:23.0 -0700 +++

RE: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Tim Moore
-Original Message- From: Matt Parker [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 8:11 PM To: Tomcat Developers List Subject: RE: [PATCH] forward instead of redirect for welcome files If you want to mirror what Apache HTTPD does: No slash present -- append

RE: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Matt Parker
On Mon, 2003-01-06 at 18:31, Tim Moore wrote: Unless I'm missing something, if you don't redirect from /foo to /foo/, then you'll have broken relative links even if the welcome file is not in a subdirectory. This would probably be a pretty common problem. For example, if your welcome file

RE: [PATCH] forward instead of redirect for welcome files

2003-01-06 Thread Costin Manolache
Please at least make it optional - with the default beeing the current behavior. Costin Matt Parker wrote: Here's the new version of the patch. the code to redirect if there is no trailing slash remains untouched, but it now forwards if there is a trailing slash. i've included more context

[PATCH] forward instead of redirect for welcome files

2003-01-03 Thread Matt Parker
I'd like to suggest that catalina perform a forward, rather than a redirect, for requests that end with '/'. With a redirect, special configuration is necessary for proxy servers to work correctly. Also, a forward doesn't require an additional round trip to the client--a redirect must get back to

Re: [PATCH] forward instead of redirect for welcome files

2003-01-03 Thread Jon Scott Stevens
on 2003/1/3 4:03 PM, Matt Parker [EMAIL PROTECTED] wrote: I'd like to suggest that catalina perform a forward, rather than a redirect, for requests that end with '/'. With a redirect, special configuration is necessary for proxy servers to work correctly. Also, a forward doesn't require an

Re: [PATCH] forward instead of redirect for welcome files

2003-01-03 Thread Matt Parker
On Fri, 2003-01-03 at 17:14, Jon Scott Stevens wrote: on 2003/1/3 4:03 PM, Matt Parker [EMAIL PROTECTED] wrote: I'd like to suggest that catalina perform a forward, rather than a redirect, for requests that end with '/'. With a redirect, special configuration is necessary for proxy