Issue 57 in urlrewritefilter: Additional requested session id conditions

7 views
Skip to first unread message

urlrewri...@googlecode.com

unread,
Dec 5, 2009, 4:22:16 AM12/5/09
to urlre...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 57 by halcyon1981: Additional requested session id conditions
http://code.google.com/p/urlrewritefilter/issues/detail?id=57

Firstly thanks for developing such a useful filter, it has saved us a
lot of hassle. Second, I have included a patch with tests and
documentation that adds the following condition checks:

-requested-session-id-from-cookie
-requested-session-id-from-url
-requested-session-id-valid

They check the corresponding methods on the request object. Our use
case is that Google has indexed URLs on our website containing
jsessionid, we would like to get rid of them immediately, thus we need
their indexer to try and crawl them, and be permanently redirected to
the corresponding URL without jsessionid in it. The problem is that
Tomcat 5.5 hides the jsessionid from the getRequestURI and
getRequestURL methods on the request object, thus we cannot detect its
presence via a simple regex. Thus the only way to detect jsessionid
in the URL is to check if isRequestedSessionIdFromCookie is true, then
do a permanent redirect to the presented URL, which will automatically
clear jsessionid because Tomcat hid it from us. An example is
provided in the documentation.

Hope this is useful to others!

Thanks,
David Erickson

Attachments:
requestedSessionIdConditions.patch 12.0 KB

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

urlrewri...@googlecode.com

unread,
Dec 5, 2009, 5:00:31 AM12/5/09
to urlre...@googlegroups.com
Updates:
Status: Accepted
Owner: avlesh
Labels: -Type-Defect Type-Enhancement OpSys-All

Comment #1 on issue 57 by avlesh: Additional requested session id conditions
http://code.google.com/p/urlrewritefilter/issues/detail?id=57

Thanks for the patch David. The case in point seems to be valid. I have
reviewed the
patch, fixed some typos and code style. I have attached the reviewed
version too. If
there are no objections, I plan to commit shortly.

Attachments:
URF-57.patch 12.2 KB

urlrewri...@googlecode.com

unread,
Jan 4, 2010, 12:52:14 AM1/4/10
to urlre...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 57 by avlesh: Additional requested session id conditions
http://code.google.com/p/urlrewritefilter/issues/detail?id=57

Fixed at Rev[274]. Thanks for the patch, David.

Reply all
Reply to author
Forward
0 new messages