The cookie is set like that:
"Set-Cookie: myStuff=1234; path=/foo; HttpOnly"
Now, when HttpUnit sees something like that, it just drops all cookies and
does not get anything.
When change the end of the Set-Cookie to "HttpOnly=", it works just fine.
But I'm not sure if browser (IE) will follow the directive and if I can
make this change to the web application.
RESOLUTION:
Janno from workplace did following:
in RFC2109CookieRecipe class defined in CookieJar added "httponly" to
isCookieReservedWord().
So the source:
class RFC2109CookieRecipe extends CookieRecipe {
protected boolean isCookieAttribute( String stringLowercase ) {
return stringLowercase.equals("path") ||
stringLowercase.equals("domain") ||
stringLowercase.equals("expires") ||
stringLowercase.equals("comment") ||
stringLowercase.equals("max-age") ||
stringLowercase.equals("version");
}
protected boolean isCookieReservedWord( String token ) {
return token.equalsIgnoreCase( "secure" ) ||
token.equalsIgnoreCase( "httponly" );
}
}
If this is the right way to do it, someone commit to CVS.
Wolfgang Fahl
None
None
Public
|
Date: 2008-03-31 17:53
|
|
Date: 2008-03-31 17:53
|
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2008-03-31 17:53 | wolfgang_fahl |
| resolution_id | None | 2008-03-31 17:53 | wolfgang_fahl |
| assigned_to | nobody | 2008-03-31 17:53 | wolfgang_fahl |
| close_date | - | 2008-03-31 17:53 | wolfgang_fahl |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use