baiheqiang / memcached-session-manager

Automatically exported from code.google.com/p/memcached-session-manager
0 stars 0 forks source link

When the jvmRoute contains a dash (-) sessions are not saved in memcached #90

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
SessionIdFormat uses a pattern "[^-.]+-[^.]+(\\.[\\w-]+)?" to test for valid 
session ids.

I had a memcached called "n1" and a jvmRoute tc7-a (and tc7-b) which leads to 
session ids like ...-n1.tc7-a. Unfortunately "tc7-a" does not match "\w+". Thus 
SessionIdFormat.isValid() fails in BackupSesionService and no data is being 
sent to Memcached.

I think there is no need to restrict the jvmRoute pattern, so instead of

[\\w-]+

you could also use ".+". Everything after the dot should belong to the jvmRoute.

Regards,

Rainer

Original issue reported on code.google.com by rainer.j...@kippdata.de on 16 Mar 2011 at 3:59

GoogleCodeExporter commented 8 years ago
Forgot to mention: Using latest code form TC7 branch. I guess the same report 
applies to the main branch.

Original comment by rainer.j...@kippdata.de on 16 Mar 2011 at 4:02

GoogleCodeExporter commented 8 years ago
Fixed in master and tomcat7 branches.

Original comment by martin.grotzke on 16 Mar 2011 at 5:17

GoogleCodeExporter commented 8 years ago
Just saw that this has already been fixed in master, was reported as issue 62 
(Support jvmRoutes containing dashes (-)). I backported the patches, now the 
fix is also in tomcat7 branch.

Thanx for reporting this again! :-)

Original comment by martin.grotzke on 16 Mar 2011 at 5:41