snichol 2002/07/11 15:03:12 Modified: java/src/org/apache/soap/transport/http Cookie.java Log: Check for the use of the Netscape Expires attribute which is *not* in any RFC and does not escape its embedded comma by using quotes. (Presumably, any Set-Cookie header that includes this attribute contains only one cookie.) Revision Changes Path 1.2 +8 -2 xml-soap/java/src/org/apache/soap/transport/http/Cookie.java Index: Cookie.java =================================================================== RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/transport/http/Cookie.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Cookie.java 17 Jun 2002 03:32:07 -0000 1.1 +++ Cookie.java 11 Jul 2002 22:03:11 -0000 1.2 @@ -302,8 +302,14 @@ if (c == '\"') { inQuote = !inQuote; } else if (c == ',' && !inQuote) { - cookieV.addElement(new Cookie(url, setCookieValue.substring(cookieOffset, i))); - cookieOffset = i + 1; + // Check for the use of the Netscape Expires attribute which is *not* in any RFC + // and does not escape its embedded comma by using quotes. (Presumably, + // any Set-Cookie header that includes this attribute contains only one + // cookie.) + if (i < 11 || !setCookieValue.substring(i - 11, i - 3).equalsIgnoreCase("expires=")) { + cookieV.addElement(new Cookie(url, setCookieValue.substring(cookieOffset, i))); + cookieOffset = i + 1; + } } } /* Ignore the possibility that inQuote is true! */
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>