marcsaeg 02/03/15 14:52:07
Modified: httpclient/src/test/org/apache/commons/httpclient
TestCookie.java TestWebappCookie.java
Log:
Updated existing tests to conform to RFC 2109 and Netscape cookie
behaviour. Added several new test cases to better test cookie behaviour.
Revision Changes Path
1.8 +175 -88
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.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TestCookie.java 4 Mar 2002 03:22:18 -0000 1.7
+++ TestCookie.java 15 Mar 2002 22:52:07 -0000 1.8
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestCookie.java,v
1.7 2002/03/04 03:22:18 marcsaeg Exp $
- * $Revision: 1.7 $
- * $Date: 2002/03/04 03:22:18 $
+ * $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 $
* ====================================================================
*
* The Apache Software License, Version 1.1
@@ -79,7 +79,8 @@
* @author Rod Waldhoff
* @author dIon Gillard
* @author <a href="mailto:[EMAIL PROTECTED]">John Evans</a>
- * @version $Revision: 1.7 $
+ * @author Marc A. Saegesser
+ * @version $Revision: 1.8 $
*/
public class TestCookie extends TestCase {
@@ -198,7 +199,7 @@
public void testParseSimple() throws Exception {
Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value");
- Cookie[] parsed = Cookie.parse("127.0.0.1","/",setCookie);
+ Cookie[] parsed = Cookie.parse("127.0.0.1","/path/path",setCookie);
assertEquals("Found 1 cookie.",1,parsed.length);
assertEquals("Name","cookie-name",parsed[0].getName());
assertEquals("Value","cookie-value",parsed[0].getValue());
@@ -207,7 +208,7 @@
//assertTrue("isToBeDiscarded",parsed[0].isToBeDiscarded());
assertTrue("isPersistent",!parsed[0].isPersistent());
assertEquals("Domain","127.0.0.1",parsed[0].getDomain());
- assertEquals("Path","/",parsed[0].getPath());
+ assertEquals("Path","/path",parsed[0].getPath());
assertTrue("Secure",!parsed[0].getSecure());
assertEquals("Version",0,parsed[0].getVersion());
}
@@ -272,7 +273,7 @@
public void testParseWithPath() throws Exception {
Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value;
Path=/path/");
- Cookie[] parsed = Cookie.parse("127.0.0.1","/path/",setCookie);
+ Cookie[] parsed = Cookie.parse("127.0.0.1","/path/path",setCookie);
assertEquals("Found 1 cookie.",1,parsed.length);
assertEquals("Name","cookie-name",parsed[0].getName());
assertEquals("Value","cookie-value",parsed[0].getValue());
@@ -349,8 +350,32 @@
assertEquals("Version",1,parsed[0].getVersion());
}
+ public void testParseMultipleDifferentPaths() throws Exception {
+ Header setCookie = new
Header("Set-Cookie","name1=value1;Version=1;Path=/commons,name1=value2;Version=1;Path=/commons/httpclient;Version=1");
+ Cookie[] parsed =
Cookie.parse(".apache.org","/commons/httpclient",true,setCookie);
+ HttpState state = new HttpState();
+ state.addCookies(parsed);
+ Cookie[] cookies = state.getCookies();
+ assertEquals("Wrong number of cookies.",2,cookies.length);
+ assertEquals("Name","name1",cookies[0].getName());
+ assertEquals("Value","value1",cookies[0].getValue());
+ assertEquals("Name","name1",cookies[1].getName());
+ assertEquals("Value","value2",cookies[1].getValue());
+ }
+
+ public void testParseMultipleSamePaths() throws Exception {
+ Header setCookie = new
Header("Set-Cookie","name1=value1;Version=1;Path=/commons,name1=value2;Version=1;Path=/commons");
+ Cookie[] parsed =
Cookie.parse(".apache.org","/commons/httpclient",true,setCookie);
+ HttpState state = new HttpState();
+ state.addCookies(parsed);
+ Cookie[] cookies = state.getCookies();
+ assertEquals("Found 1 cookies.",1,cookies.length);
+ assertEquals("Name","name1",cookies[0].getName());
+ assertEquals("Value","value2",cookies[0].getValue());
+ }
+
public void testParseWithWrongDomain() throws Exception {
- Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value;
domain=127.0.0.1");
+ Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value;
domain=127.0.0.1; version=1");
try {
Cookie[] parsed = Cookie.parse("127.0.0.2","/",setCookie);
fail("HttpException exception should have been thrown");
@@ -359,6 +384,62 @@
}
}
+ public void testParseWithWrongDomain2() throws Exception {
+ Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value;
domain=.c.com; version=1");
+ try {
+ Cookie[] parsed = Cookie.parse("a.b.c.com","/",setCookie);
+ fail("HttpException exception should have been thrown");
+ } catch (HttpException e) {
+ // expected
+ }
+ }
+
+ /**
+ * Domain has no embedded dots
+ */
+ public void testParseWithIllegalDomain() throws Exception {
+ Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value;
domain=.com; version=1");
+ try {
+ Cookie[] parsed = Cookie.parse("b.com","/",setCookie);
+ fail("HttpException exception should have been thrown");
+ } catch (HttpException e) {
+ // expected
+ }
+ }
+
+ /**
+ * Domain has no embedded dots again
+ */
+ public void testParseWithIllegalDomain2() throws Exception {
+ Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value;
domain=.com.; version=1");
+ try {
+ Cookie[] parsed = Cookie.parse("b.com","/",setCookie);
+ fail("HttpException exception should have been thrown");
+ } catch (HttpException e) {
+ // expected
+ }
+ }
+
+ public void testParseWithIllegalNetscapeDomain1() throws Exception {
+ Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value;
domain=.com");
+ try {
+ Cookie[] parsed = Cookie.parse("a.com","/",setCookie);
+ fail("HttpException exception should have been thrown");
+ } catch (HttpException e) {
+ // expected
+ }
+ }
+
+ public void testParseWithWrongNetscapeDomain2() throws Exception {
+ Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value;
domain=.y.z");
+ try {
+ Cookie[] parsed = Cookie.parse("x.y.z","/",setCookie);
+ fail("HttpException exception should have been thrown");
+ } catch (HttpException e) {
+ // expected
+ }
+ }
+
public void testParseWithWrongPath() throws Exception {
Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value;
domain=127.0.0.1; path=/not/just/root");
try {
@@ -389,6 +470,54 @@
}
}
+ public void testParseWithNullDomain() {
+ Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value;
domain=127.0.0.1; path=/; secure");
+ try {
+ Cookie[] parsed = Cookie.parse(null,"/",false,setCookie);
+ fail("IllegalArgumentException should have been thrown");
+ } catch (IllegalArgumentException e) {
+ // expected
+ } catch (Exception e){
+ fail("Should have thrown IllegalArgumentException.");
+ }
+ }
+
+ public void testParseWithNullPath() {
+ 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",null,false,setCookie);
+ fail("IllegalArgumentException should have been thrown");
+ } catch (IllegalArgumentException e) {
+ // expected
+ } catch (Exception e){
+ fail("Should have thrown IllegalArgumentException.");
+ }
+ }
+
+ public void testParseWithNullDomainAndPath() {
+ Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value;
domain=127.0.0.1; path=/; secure");
+ try {
+ Cookie[] parsed = Cookie.parse(null,null,false,setCookie);
+ fail("IllegalArgumentException should have been thrown");
+ } catch (IllegalArgumentException e) {
+ // expected
+ } catch (Exception e){
+ fail("Should have thrown IllegalArgumentException.");
+ }
+ }
+
+ public void testParseWithPathMismatch() {
+ Header setCookie = new Header("Set-Cookie","cookie-name=cookie-value;
path=/path/path/path");
+ try {
+ Cookie[] parsed = Cookie.parse("127.0.0.1","/path",false,setCookie);
+ fail("HttpException should have been thrown.");
+ } catch (HttpException e) {
+ // expected
+ } catch (Exception e){
+ fail("Should have thrown HttpException.");
+ }
+ }
+
public void testComparator() throws Exception {
Header setCookie = null;
Cookie[] parsed = null;
@@ -451,36 +580,6 @@
}
}
- /** Check parse works with no path
- */
- public void testParseWithNullPath() throws Exception {
- Header setCookie = new Header("Set-Cookie",
- TEST_COOKIE + SEP + OLD_EXPIRY);
- // null path
- Cookie[] parsed = Cookie.parse(DOMAIN_NAME, null, true, setCookie);
- assertNull(parsed[0].getPath());
- }
-
- /** Check parse works with no domain
- */
- public void testParseWithNullDomain() throws Exception {
- Header setCookie = new Header("Set-Cookie",
- TEST_COOKIE + SEP + OLD_EXPIRY);
- // null path
- Cookie[] parsed = Cookie.parse(null, ROOT_PATH, true, setCookie);
- assertNull(parsed[0].getDomain());
- }
-
- /** Check parse works with no domain and path
- */
- public void testParseWithNullDomainAndPath() throws Exception {
- Header setCookie = new Header("Set-Cookie",
- TEST_COOKIE + SEP + OLD_EXPIRY);
- // null path
- Cookie[] parsed = Cookie.parse(null, null, true, setCookie);
- assertNull(parsed[0].getDomain());
- }
-
/** Call Cookie.createCookieHeader providing null for domain to match on
*/
public void testCreateCookieHeaderWithNullDomain() throws Exception {
@@ -488,73 +587,61 @@
TEST_COOKIE + SEP + OLD_EXPIRY);
Cookie[] parsed = Cookie.parse(DOMAIN_NAME, ROOT_PATH, true, setCookie);
- Header header = Cookie.createCookieHeader(null, ROOT_PATH, false, parsed);
- assertNotNull(header);
+ try{
+ Header header = Cookie.createCookieHeader(null, ROOT_PATH, false,
parsed);
+ fail("IllegalArgumentException should have been thrown.");
+ }catch(IllegalArgumentException e){
+ // Expected
+ }catch(Exception e){
+ fail("Threw wrong type of exception. Expected
IllegalArgumentException.");
+ }
}
/** Call Cookie.createCookieHeader providing null for path to match on
*/
- public void testCreateCookieHeaderWithNullPath() throws Exception {
+ public void testCreateCookieHeaderWithNullPath() throws Exception{
Header setCookie = new Header("Set-Cookie",
TEST_COOKIE + SEP + OLD_EXPIRY);
Cookie[] parsed = Cookie.parse(DOMAIN_NAME, ROOT_PATH, false, setCookie);
- Header header = Cookie.createCookieHeader(DOMAIN_NAME, null, false, parsed);
- assertNotNull(header);
+ try{
+ Header header = Cookie.createCookieHeader(DOMAIN_NAME, null, false,
parsed);
+ fail("IllegalArgumentException should have been thrown.");
+ }catch(IllegalArgumentException e){
+ // Expected
+ }catch(Exception e){
+ fail("Threw wrong type of exception. Expected
IllegalArgumentException.");
+ }
}
- /** Call Cookie.createCookieHeader providing null for domain and path to
- * match on
+ /**
+ * Verify that cookies with no domain or path don't get added to a cookie
header.
*/
- public void testCreateCookieHeaderWithNullDomainAndPath() throws Exception {
- Header setCookie = new Header("Set-Cookie",
- TEST_COOKIE + SEP + OLD_EXPIRY);
- Cookie[] parsed = Cookie.parse(DOMAIN_NAME, ROOT_PATH, true, setCookie);
+ public void testCreateCookieHeaderWithUninitializedCookies() throws Exception {
+ Cookie cookies[] = new Cookie[2];
+ cookies[0] = new Cookie(null, "name0", "value0");
+ cookies[1] = new Cookie(null, "name1", "value1", null, null, false);
- Header header = Cookie.createCookieHeader(null, null, false, parsed);
- assertNotNull(header);
+ Header header = Cookie.createCookieHeader(DOMAIN_NAME, ROOT_PATH, false,
cookies);
+ assertEquals("createCookieHeader added cookies with null domains or paths",
null, header);
}
- /** Call Cookie.createCookieHeader providing null for domain of
- * a cookie in the array
- */
- public void testCreateCookieHeaderWithNullDomainCookie() throws Exception {
- Cookie c1 = new Cookie(null, "cookieName", "cookieValue");
- Cookie c2 = new Cookie(DOMAIN_NAME, "cookieName", "cookieValue");
- Cookie[] parsed = new Cookie[] {c1, c2};
-
- Header header = Cookie.createCookieHeader(DOMAIN_NAME, ROOT_PATH,
- false, parsed);
- assertNotNull(header);
- }
-
- /** Call Cookie.createCookieHeader providing null for path of
- * a cookie in the array
- */
- public void testCreateCookieHeaderWithNullPathCookie() throws Exception {
- Cookie c1 = new Cookie(DOMAIN_NAME, "cookieName", "cookieValue", null, -1,
- false);
- Cookie c2 = new Cookie(DOMAIN_NAME, "cookieName", "cookieValue");
- Cookie[] parsed = new Cookie[] {c1, c2};
-
- Header header = Cookie.createCookieHeader(DOMAIN_NAME, ROOT_PATH, false,
- parsed);
- assertNotNull(header);
- }
-
- /** Call Cookie.createCookieHeader providing null for domain and path of
- * a cookie in the array
+ /** Call Cookie.createCookieHeader providing null for domain and path to
+ * match on
*/
- public void testCreateCookieHeaderWithNullDomainAndPathCookie() throws
Exception {
+ public void testCreateCookieHeaderWithNullDomainAndPath() throws Exception {
Header setCookie = new Header("Set-Cookie",
TEST_COOKIE + SEP + OLD_EXPIRY);
- Cookie c1 = new Cookie(null, "cookieName", "cookieValue", null, -1,
- false);
- Cookie c2 = new Cookie(DOMAIN_NAME, "cookieName", "cookieValue");
- Cookie[] parsed = new Cookie[] {c1, c2};
+ Cookie[] parsed = Cookie.parse(DOMAIN_NAME, ROOT_PATH, true, setCookie);
- Header header = Cookie.createCookieHeader(DOMAIN_NAME, ROOT_PATH, false,
parsed);
- assertNotNull(header);
+ try{
+ Header header = Cookie.createCookieHeader(null, null, false, parsed);
+ fail("IllegalArgumentException should have been thrown.");
+ }catch(IllegalArgumentException e){
+ // Expected
+ }catch(Exception e){
+ fail("Threw wrong type of exception. Expected
IllegalArgumentException.");
+ }
}
-
}
+
1.4 +13 -13
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappCookie.java
Index: TestWebappCookie.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappCookie.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TestWebappCookie.java 4 Feb 2002 15:26:43 -0000 1.3
+++ TestWebappCookie.java 15 Mar 2002 22:52:07 -0000 1.4
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappCookie.java,v
1.3 2002/02/04 15:26:43 dion Exp $
- * $Revision: 1.3 $
- * $Date: 2002/02/04 15:26:43 $
+ * $Header:
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappCookie.java,v
1.4 2002/03/15 22:52:07 marcsaeg Exp $
+ * $Revision: 1.4 $
+ * $Date: 2002/03/15 22:52:07 $
* ====================================================================
*
* The Apache Software License, Version 1.1
@@ -82,7 +82,7 @@
* "httpclient.test.webappContext" property.
*
* @author Rodney Waldhoff
- * @version $Id: TestWebappCookie.java,v 1.3 2002/02/04 15:26:43 dion Exp $
+ * @version $Id: TestWebappCookie.java,v 1.4 2002/03/15 22:52:07 marcsaeg Exp $
*/
public class TestWebappCookie extends TestWebappBase {
@@ -309,7 +309,7 @@
}
assertEquals(200,method2.getStatusCode());
assertTrue(method2.getResponseBodyAsString().indexOf("<title>ReadCookieServlet:
GET</title>") >= 0);
- assertTrue(method2.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1;simplecookie=value;$Path=/" + context + "/cookie;$Domain=" + host +
"</tt></p>") >= 0);
+ assertTrue(method2.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1; simplecookie=value</tt></p>") >= 0);
assertTrue(method2.getResponseBodyAsString().indexOf("<tt>simplecookie=value</tt><br>")
>= 0);
}
@@ -345,7 +345,7 @@
}
assertEquals(200,method2.getStatusCode());
assertTrue(method2.getResponseBodyAsString().indexOf("<title>ReadCookieServlet:
GET</title>") >= 0);
-
assertTrue(method2.getResponseBodyAsString(),method2.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1;simplecookie=value;$Path=/" + context + "/cookie;$Domain=" + host +
";domaincookie=value;$Path=/" + context + "/cookie;$Domain=" + host + "</tt></p>") >=
0);
+
assertTrue(method2.getResponseBodyAsString(),method2.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1; simplecookie=value; domaincookie=value; $Domain=" + host + "</tt></p>")
>= 0);
assertTrue(method2.getResponseBodyAsString().indexOf("<tt>simplecookie=value</tt><br>")
>= 0);
assertTrue(method2.getResponseBodyAsString().indexOf("<tt>domaincookie=value</tt><br>")
>= 0);
}
@@ -386,7 +386,7 @@
}
assertEquals(200,method2.getStatusCode());
assertTrue(method2.getResponseBodyAsString().indexOf("<title>ReadCookieServlet:
GET</title>") >= 0);
-
assertTrue(method2.getResponseBodyAsString(),method2.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1;simplecookie=value;$Path=/" + context + "/cookie;$Domain=" + host +
";domaincookie=value;$Path=/" + context + "/cookie;$Domain=" + host + "</tt></p>") >=
0);
+
assertTrue(method2.getResponseBodyAsString(),method2.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1; simplecookie=value; domaincookie=value; $Domain=" + host + "</tt></p>")
>= 0);
assertTrue(method2.getResponseBodyAsString().indexOf("<tt>simplecookie=value</tt><br>")
>= 0);
assertTrue(method2.getResponseBodyAsString().indexOf("<tt>domaincookie=value</tt><br>")
>= 0);
}
@@ -420,7 +420,7 @@
}
assertEquals(200,method4.getStatusCode());
assertTrue(method4.getResponseBodyAsString().indexOf("<title>ReadCookieServlet:
GET</title>") >= 0);
- assertTrue(method4.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1;domaincookie=value;$Path=/" + context + "/cookie;$Domain=" + host +
"</tt></p>") >= 0);
+ assertTrue(method4.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1; domaincookie=value; $Domain=" + host + "</tt></p>") >= 0);
assertTrue(method4.getResponseBodyAsString().indexOf("<tt>domaincookie=value</tt><br>")
>= 0);
}
}
@@ -461,7 +461,7 @@
}
assertEquals(200,method2.getStatusCode());
assertTrue(method2.getResponseBodyAsString().indexOf("<title>ReadCookieServlet:
PUT</title>") >= 0);
-
assertTrue(method2.getResponseBodyAsString(),method2.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1;simplecookie=value;$Path=/" + context + "/cookie;$Domain=" + host +
";domaincookie=value;$Path=/" + context + "/cookie;$Domain=" + host + "</tt></p>") >=
0);
+
assertTrue(method2.getResponseBodyAsString(),method2.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1; simplecookie=value; domaincookie=value; $Domain=" + host + "</tt></p>")
>= 0);
assertTrue(method2.getResponseBodyAsString().indexOf("<tt>simplecookie=value</tt><br>")
>= 0);
assertTrue(method2.getResponseBodyAsString().indexOf("<tt>domaincookie=value</tt><br>")
>= 0);
}
@@ -495,7 +495,7 @@
}
assertEquals(200,method4.getStatusCode());
assertTrue(method4.getResponseBodyAsString().indexOf("<title>ReadCookieServlet:
PUT</title>") >= 0);
- assertTrue(method4.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1;domaincookie=value;$Path=/" + context + "/cookie;$Domain=" + host +
"</tt></p>") >= 0);
+ assertTrue(method4.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1; domaincookie=value; $Domain=" + host + "</tt></p>") >= 0);
assertTrue(method4.getResponseBodyAsString().indexOf("<tt>domaincookie=value</tt><br>")
>= 0);
}
}
@@ -532,7 +532,7 @@
}
assertEquals(200,method.getStatusCode());
assertTrue(method.getResponseBodyAsString().indexOf("<title>ReadCookieServlet:
GET</title>") >= 0);
- assertTrue(method.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1;pathcookie=value;$Path=/;$Domain=" + host + "</tt></p>") >= 0);
+ assertTrue(method.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1; pathcookie=value; $Path=/</tt></p>") >= 0);
assertTrue(method.getResponseBodyAsString().indexOf("<tt>pathcookie=value</tt><br>")
>= 0);
}
}
@@ -569,7 +569,7 @@
}
assertEquals(200,method.getStatusCode());
assertTrue(method.getResponseBodyAsString().indexOf("<title>ReadCookieServlet:
GET</title>") >= 0);
- assertTrue(method.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1;pathcookie=value;$Path=/" + context + ";$Domain=" + host + "</tt></p>") >=
0);
+ assertTrue(method.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1; pathcookie=value; $Path=/" + context +"</tt></p>") >= 0);
assertTrue(method.getResponseBodyAsString().indexOf("<tt>pathcookie=value</tt><br>")
>= 0);
}
}
@@ -606,7 +606,7 @@
}
assertEquals(200,method.getStatusCode());
assertTrue(method.getResponseBodyAsString().indexOf("<title>ReadCookieServlet:
GET</title>") >= 0);
- assertTrue(method.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1;pathcookie=value;$Path=/" + context + "/cookie;$Domain=" + host +
"</tt></p>") >= 0);
+ assertTrue(method.getResponseBodyAsString().indexOf("<p><tt>Cookie:
$Version=1; pathcookie=value; $Path=/" + context + "/cookie</tt></p>") >= 0);
assertTrue(method.getResponseBodyAsString().indexOf("<tt>pathcookie=value</tt><br>")
>= 0);
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>