|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.owasp.webscarab.model.Cookie
public class Cookie
Represents a cookie received from a web server From rfc 2109 The syntax for the Set-Cookie response header is set-cookie = "Set-Cookie:" cookies cookies = 1#cookie cookie = NAME "=" VALUE *(";" cookie-av) NAME = attr VALUE = value cookie-av = "Comment" "=" value | "Domain" "=" value | "Max-Age" "=" value | "Path" "=" value | "Secure" | "Version" "=" 1*DIGIT added support for Microsoft's new httponly flag - untested, and largely unused!
Constructor Summary | |
---|---|
Cookie(java.util.Date date,
HttpUrl url,
java.lang.String setHeader)
Creates a new instance of Cookie |
|
Cookie(java.util.Date date,
java.lang.String setHeader)
This variant of the constuctor should only be called when we are sure that the Set-Cookie header already contains the domain and path. |
Method Summary | |
---|---|
java.lang.String |
getComment()
returns the comment of the cookie |
java.util.Date |
getDate()
returns the date/time the cookie was created |
java.lang.String |
getDomain()
returns the domain of the cookie |
boolean |
getHTTPOnly()
indicates whther this cookie had MS's "httpOnly" flag set |
java.lang.String |
getKey()
an identifier for the cookie "name", made up of the domain, the path, and the name of the cookie |
java.lang.String |
getMaxAge()
returns the maximum age of the cookie |
java.lang.String |
getName()
returns the name of the cookie |
java.lang.String |
getPath()
returns the path of the cookie |
boolean |
getSecure()
indicates whether this cookie had the "secure" flag set |
java.lang.String |
getValue()
returns the value of the cookie |
java.lang.String |
getVersion()
returns the version of the cookie |
java.lang.String |
setCookie()
returns a string equivalent to the complete "Set-Cookie" header that would have been sent. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Cookie(java.util.Date date, HttpUrl url, java.lang.String setHeader)
date
- the date the cookie was created/receivedurl
- the URL the the cookie was sent back fromsetHeader
- the actual "Set-Cookie" header valuepublic Cookie(java.util.Date date, java.lang.String setHeader)
date
- The date the cookie was created or receivedsetHeader
- a complete Set-Cookie headerMethod Detail |
---|
public java.lang.String getKey()
public java.util.Date getDate()
public java.lang.String getName()
public java.lang.String getValue()
public java.lang.String getDomain()
public java.lang.String getMaxAge()
public java.lang.String getPath()
public boolean getSecure()
public boolean getHTTPOnly()
public java.lang.String getVersion()
public java.lang.String getComment()
public java.lang.String setCookie()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |