tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject svn commit: r354267 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/Cookies.java
Date Tue, 06 Dec 2005 03:16:04 GMT
Author: billbarker
Date: Mon Dec  5 19:15:59 2005
New Revision: 354267

URL: http://svn.apache.org/viewcvs?rev=354267&view=rev
Log:
Strip quotes when parsing Cookie values, even for v0 Cookies.

This is in line with what ServerCookie does when we create the Cookie (i.e. we quote v0 Cookie
values if necessary).  This way we are at least consistant.

Fix for Bug #36863

Modified:
    tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/Cookies.java

Modified: tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/Cookies.java
URL: http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/Cookies.java?rev=354267&r1=354266&r2=354267&view=diff
==============================================================================
--- tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/Cookies.java (original)
+++ tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/Cookies.java Mon Dec  5
19:15:59 2005
@@ -247,9 +247,8 @@
             int startValue=skipSpaces( bytes, pos, end);
             int endValue=startValue;
             
-            // quote is valid only in version=1 cookies
             cc=bytes[pos];
-            if( ( version == 1 || isSpecial ) && ( cc== '\'' || cc=='"' ) ) {
+            if(  cc== '\'' || cc=='"' ) {
                 startValue++;
                 endValue=indexOf( bytes, startValue, end, cc );
                 pos=endValue+1; // to skip to next cookie



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


Mime
View raw message