Author: markt
Date: Wed Jul 18 19:41:08 2007
New Revision: 557467
URL: http://svn.apache.org/viewvc?view=rev&rev=557467
Log:
Make cookie handling conform to RFC2965. Don't treat the single quote character
as special.
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/Cookies.java
Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/Cookies.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/Cookies.java?view=diff&rev=557467&r1=557466&r2=557467
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/Cookies.java
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/Cookies.java Wed Jul
18 19:41:08 2007
@@ -249,7 +249,7 @@
int endValue=startValue;
cc=bytes[pos];
- if( cc== '\'' || cc=='"' ) {
+ if( cc=='"' ) {
endValue=findDelim3( bytes, startValue+1, end, cc );
if (endValue == -1) {
endValue=findDelim2( bytes, startValue+1, end );
@@ -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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]