You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Konstantin Kolinko <kn...@gmail.com> on 2011/03/15 15:28:13 UTC
CrawlerSessionManagerValve and Response.encodeURL(..)
Hi!
The CrawlerSessionManagerValve sets sessionId from ip address as
request.setRequestedSessionId(sessionInfo.getSessionId());
I have not checked, but I suspect that the Response.encodeURL(..)
calls in the web application
will still be including the session id into the URLs.
Woudn't it be good to disable url-encoding of session id for such requests?
An easy way to implement that should be to add the following line there:
request.setRequestedSessionCookie(true);
The drawbacks are
1) it looks hacky and is just used to fool
o.a.catalina.connector.Response#isEncodeable(String).
2) the first response that creates a session is unaffected and will
still include sessionid in the URLs
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: CrawlerSessionManagerValve and Response.encodeURL(..)
Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/3/15 Mark Thomas <ma...@apache.org>:
> On 15/03/2011 14:28, Konstantin Kolinko wrote:
>> Hi!
>>
>> The CrawlerSessionManagerValve sets sessionId from ip address as
>>
>> request.setRequestedSessionId(sessionInfo.getSessionId());
>>
>> I have not checked, but I suspect that the Response.encodeURL(..)
>> calls in the web application
>> will still be including the session id into the URLs.
>
> I don't think it is an issue. If the app is encoding the session ID and
> the client is returning it with the next request then there is no need
> for this valve.
>
> My test case for this feature is the ASF Jira instance which is
> currently running at around 7,000 concurrent sessions rather than the
> 130,000 it had before this valve was used. I have plans to look further
> at those 7,000 sessions and may tweak the valve further but I suspect
> the changes will be in the pattern used to identify bot-type user agents.
>
OK, understood. Let's keep it limited to the original task.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: CrawlerSessionManagerValve and Response.encodeURL(..)
Posted by Mark Thomas <ma...@apache.org>.
On 15/03/2011 14:28, Konstantin Kolinko wrote:
> Hi!
>
> The CrawlerSessionManagerValve sets sessionId from ip address as
>
> request.setRequestedSessionId(sessionInfo.getSessionId());
>
> I have not checked, but I suspect that the Response.encodeURL(..)
> calls in the web application
> will still be including the session id into the URLs.
I don't think it is an issue. If the app is encoding the session ID and
the client is returning it with the next request then there is no need
for this valve.
My test case for this feature is the ASF Jira instance which is
currently running at around 7,000 concurrent sessions rather than the
130,000 it had before this valve was used. I have plans to look further
at those 7,000 sessions and may tweak the valve further but I suspect
the changes will be in the pattern used to identify bot-type user agents.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org