tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r557468 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/Cookies.java
Date Thu, 19 Jul 2007 02:44:51 GMT
Author: markt
Date: Wed Jul 18 19:44:50 2007
New Revision: 557468

URL: http://svn.apache.org/viewvc?view=rev&rev=557468
Log:
Make cookie handling conform to RFC2965. Don't treat the single quote character as special.
Port fix from TC6.

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/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/Cookies.java?view=diff&rev=557468&r1=557467&r2=557468
==============================================================================
--- 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 Wed Jul 18
19:44:50 2007
@@ -249,7 +249,7 @@
             int endValue=startValue;
             
             cc=bytes[pos];
-            if(  cc== '\'' || cc=='"' ) {
+            if(  cc=='"' ) {
                 startValue++;
                 endValue=indexOf( bytes, startValue, end, cc );
                 pos=endValue+1; // to skip to next cookie
@@ -412,7 +412,7 @@
     /**
      *
      * Strips quotes from the start and end of the cookie string
-     * This conforms to RFC 2109
+     * This conforms to RFC 2965
      * 
      * @param value            a <code>String</code> specifying the cookie 
      *                         value (possibly quoted).
@@ -423,8 +423,7 @@
     private static String stripQuote( String value )
     {
         //        log("Strip quote from " + value );
-        if (((value.startsWith("\"")) && (value.endsWith("\""))) ||
-            ((value.startsWith("'") && (value.endsWith("'"))))) {
+        if (value.startsWith("\"") && value.endsWith("\"")) {
             try {
                 return value.substring(1,value.length()-1);
             } catch (Exception ex) { 



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


Mime
View raw message