You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ma...@apache.org on 2002/04/23 21:01:03 UTC
cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestCookie.java
marcsaeg 02/04/23 12:01:03
Modified: httpclient/src/test/org/apache/commons/httpclient
TestCookie.java
Log:
Removed test for invalid secure attribute on cookies. We now allow this
situtation (per RFC 2109).
Someone (probably me, later) should add some additional test cases to
ensure that we only add secure cookies to the Cookie header for secure
connections.
Revision Changes Path
1.9 +4 -24 jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestCookie.java
Index: TestCookie.java
===================================================================
RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestCookie.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- TestCookie.java 15 Mar 2002 22:52:07 -0000 1.8
+++ TestCookie.java 23 Apr 2002 19:01:03 -0000 1.9
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestCookie.java,v 1.8 2002/03/15 22:52:07 marcsaeg Exp $
- * $Revision: 1.8 $
- * $Date: 2002/03/15 22:52:07 $
+ * $Header: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestCookie.java,v 1.9 2002/04/23 19:01:03 marcsaeg Exp $
+ * $Revision: 1.9 $
+ * $Date: 2002/04/23 19:01:03 $
* ====================================================================
*
* The Apache Software License, Version 1.1
@@ -80,7 +80,7 @@
* @author dIon Gillard
* @author <a href="mailto:JEvans@Cyveillance.com">John Evans</a>
* @author Marc A. Saegesser
- * @version $Revision: 1.8 $
+ * @version $Revision: 1.9 $
*/
public class TestCookie extends TestCase {
@@ -444,26 +444,6 @@
Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value; domain=127.0.0.1; path=/not/just/root");
try {
Cookie[] parsed = Cookie.parse("127.0.0.1","/",setCookie);
- fail("HttpException exception should have been thrown");
- } catch (HttpException e) {
- // expected
- }
- }
-
- public void testParseWithWrongSecure() throws Exception {
- Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value; domain=127.0.0.1; path=/; secure");
- try {
- Cookie[] parsed = Cookie.parse("127.0.0.1","/",setCookie);
- fail("HttpException exception should have been thrown");
- } catch (HttpException e) {
- // expected
- }
- }
-
- public void testParseWithWrongSecure2() throws Exception {
- Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value; domain=127.0.0.1; path=/; secure");
- try {
- Cookie[] parsed = Cookie.parse("127.0.0.1","/",false,setCookie);
fail("HttpException exception should have been thrown");
} catch (HttpException e) {
// expected
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>