You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ol...@apache.org on 2005/10/23 15:17:06 UTC
svn commit: r327789 -
/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/cookie/TestCookieNetscapeDraft.java
Author: olegk
Date: Sun Oct 23 06:17:00 2005
New Revision: 327789
URL: http://svn.apache.org/viewcvs?rev=327789&view=rev
Log:
Additional test coverage for the bug report #37204
Modified:
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/cookie/TestCookieNetscapeDraft.java
Modified: jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/cookie/TestCookieNetscapeDraft.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/cookie/TestCookieNetscapeDraft.java?rev=327789&r1=327788&r2=327789&view=diff
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/cookie/TestCookieNetscapeDraft.java (original)
+++ jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/cookie/TestCookieNetscapeDraft.java Sun Oct 23 06:17:00 2005
@@ -238,7 +238,6 @@
/**
* Tests Netscape specific expire attribute parsing.
*/
-
public void testNetscapeCookieExpireAttribute() throws Exception {
CookieSpec cookiespec = new NetscapeDraftSpec();
Header header = new Header("Set-Cookie",
@@ -256,6 +255,21 @@
}
}
+ /**
+ * Tests Netscape specific expire attribute without a time zone.
+ */
+ public void testNetscapeCookieExpireAttributeNoTimeZone() throws Exception {
+ CookieSpec cookiespec = new NetscapeDraftSpec();
+ Header header = new Header("Set-Cookie",
+ "name=value; expires=Thu, 01-Jan-2006 00:00:00 ");
+ try {
+ cookiespec.parse("myhost.mydomain.com", 80, "/", false, header );
+ fail("MalformedCookieException should have been thrown");
+ } catch (MalformedCookieException ex) {
+ // expected
+ }
+ }
+
/**
* Tests if cookie values with embedded comma are handled correctly.
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org