tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Evans" <cev...@bitmo.com>
Subject Re: HttpServletResponse.encodeURL is broken for relative URLs
Date Sun, 05 Nov 2000 22:09:20 GMT

Okay, this is my mistake.   It appears to be broken in Tomcat 3.1 but fixed
in Tomcat 3.2b6.  Sorry to bother you with it.

-Colin

--
Colin Evans
Bitmo, Inc. (http://www.bitmo.com)
(415)920.7225 / cevans@bitmo.com


----- Original Message -----
From: "Craig R. McClanahan" <Craig.McClanahan@eng.sun.com>
To: <tomcat-dev@jakarta.apache.org>
Sent: Saturday, November 04, 2000 7:21 PM
Subject: Re: HttpServletResponse.encodeURL is broken for relative URLs


> Colin Evans wrote:
>
> > Hi, it appears that HttpServletResponse.encodeURL refuses to add a
> > JSESSIONID to relative URLs for Tomcat 3.1 and 3.2b6.  I looked at the
code,
> > and it appears that HttpServletResponseFacade.isEncodeable() always
returns
> > false on URL strings that are not fully qualified, and this causes
encodeURL
> > to always ignore relative URLs.
> >
> > I can't find anything in the javadoc or servlet spec saying that
encodeURL
> > is supposed to ignore relative URLs.  Since using relative URLs for
internal
> > navigation around websites is considered a standard practice, my guess
is
> > that encodeURL is supposed work correctly with relative URLs.  Am I
mistaken
> > in this?
> >
> > This is a bad bug for me; I'm writing Palm VII sites, and Palm web
clippings
> > don't support cookies at all, which makes HttpServletResponse.encodeURL
> > important.
> >
>
> It is not supposed to ignore them -- it is supposed to convert them to
absolute
> and then add the path parameter if:
> - The host and port of the absolute URL
>   matches the original request
> - The context path of the absolute URL
>   matches the original request
>   (i.e. the URL points back at this app)
>
> I will take a look - but in the past, this has seemed to work correctly.
>
> >
> > Thanks!
> > -Colin
> >
>
> Craig
>
>
> >
> > --
> > Colin Evans
> > Bitmo, Inc. (http://www.bitmo.com)
> > (415)920.7225 / cevans@bitmo.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message