You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2007/10/30 14:57:24 UTC

[veltools] Unnecessary toEncoded method in struts.SecureLinkTool?

All,

While researching an enhancement patch that I'm likely to post, I came
across the struts.SecureLinkTool.toEncoded method. It appears to simply
add the ";jsessionid=[session id]" parameter to a URL.

Since the response object is available to the SecureLinkTool (it's a
protected member of its superclass), why not replace that entire method
with a call to response.encodeURL?

-chris


Re: [veltools] Unnecessary toEncoded method in struts.SecureLinkTool?

Posted by Nathan Bubna <nb...@gmail.com>.
from looking at the source code, there is a comment within the method
that implies that SSLExt also supports this sort of toEncoded()
behavior, but handles anchor/query string ordering differently.  any
idea how response.encodeURL() handles those (if it does at all)?  i
didn't write that code, so i'm hesitant to replace it without some
assurance that it will behave the same (or at least that the resulting
urls will function equivalently).

since i'm not sure if Marino is still reading this list carefully, it
might be worth shooting him a personal email to get his thoughts on
it.

On 10/30/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
> All,
>
> While researching an enhancement patch that I'm likely to post, I came
> across the struts.SecureLinkTool.toEncoded method. It appears to simply
> add the ";jsessionid=[session id]" parameter to a URL.
>
> Since the response object is available to the SecureLinkTool (it's a
> protected member of its superclass), why not replace that entire method
> with a call to response.encodeURL?
>
> -chris
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org