Logo Search packages:      
Sourcecode: paros version File versions  Download package

org::parosproxy::paros::network::HttpRequestHeader Class Reference

Inheritance diagram for org::parosproxy::paros::network::HttpRequestHeader:

List of all members.


Detailed Description

Respresent a HTTP request header. A request header begins with method uri http-version

Definition at line 36 of file HttpRequestHeader.java.


Public Member Functions

void addHeader (String name, String val)
void clear ()
String getCharset ()
int getContentLength ()
String getHeader (String name)
Vector getHeaders (String name)
String getHeadersAsString ()
String getHostName ()
int getHostPort ()
String getLineDelimiter ()
String getMethod ()
String getPrimeHeader ()
boolean getSecure ()
URI getURI ()
String getVersion ()
 HttpRequestHeader (String method, URI uri, String version) throws HttpMalformedHeaderException
 HttpRequestHeader (String data) throws HttpMalformedHeaderException
 HttpRequestHeader (String data, boolean isSecure) throws HttpMalformedHeaderException
 HttpRequestHeader ()
boolean isConnectionClose ()
boolean isEmpty ()
boolean isHttp10 ()
boolean isHttp11 ()
boolean isImage ()
boolean isMalformedHeader ()
boolean isText ()
boolean isTransferEncodingChunked ()
void setContentLength (int len)
void setHeader (String name, String value)
void setMessage (String data) throws HttpMalformedHeaderException
void setMessage (String data, boolean isSecure) throws HttpMalformedHeaderException
void setMethod (String method)
void setSecure (boolean isSecure) throws URIException, NullPointerException
void setURI (URI uri) throws URIException, NullPointerException
void setVersion (String version)
String toString ()

Static Public Member Functions

static boolean isRequestLine (String data)
static URI parseURI (String sUri) throws URIException

Static Public Attributes

static final String _CHUNKED = "Chunked"
static final String _CLOSE = "Close"
static final String _KEEP_ALIVE = "Keep-alive"
static final String ACCEPT_ENCODING = "Accept-Encoding"
static final String AUTHORIZATION = "Authorization"
static final String CACHE_CONTROL = "Cache-control"
static final String CONNECT = "CONNECT"
static final String CONNECTION = "Connection"
static final String CONTENT_ENCODING = "Content-encoding"
static final String CONTENT_LENGTH = "Content-length"
static final String CONTENT_TYPE = "Content-Type"
static final String CRLF = "\r\n"
static final String DELETE = "DELETE"
static final String GET = "GET"
static final String HEAD = "HEAD"
static final String HOST = "Host"
static final String HTTP = "http"
static final String HTTP09 = "HTTP/0.9"
static final String HTTP10 = "HTTP/1.0"
static final String HTTP11 = "HTTP/1.1"
static final String HTTPS = "https"
static final String IF_MODIFIED_SINCE = "If-Modified-Since"
static final String IF_NONE_MATCH = "If-None-Match"
static final String LF = "\n"
static final String LOCATION = "Location"
static final String OPTIONS = "OPTIONS"
static final Pattern patternCRLF = Pattern.compile("\\r\\n", Pattern.MULTILINE)
static final Pattern patternLF = Pattern.compile("\\n", Pattern.MULTILINE)
static final String POST = "POST"
static final String PRAGMA = "Pragma"
static final String PROXY_AUTHENTICATE = "Proxy-authenticate"
static final String PROXY_CONNECTION = "Proxy-Connection"
static final String PUT = "PUT"
static final String REFERER = "Referer"
static final String SCHEME_HTTP = "http://"
static final String SCHEME_HTTPS = "https://"
static final String TRACE = "TRACE"
static final String TRANSFER_ENCODING = "Transfer-encoding"
static final String USER_AGENT = "User-Agent"
static final String WWW_AUTHENTICATE = "WWW-Authenticate"

Protected Member Functions

boolean parse (String data) throws Exception
boolean parse (boolean isSecure) throws URIException, NullPointerException

Protected Attributes

int mContentLength = -1
Hashtable mHeaderFields = new Hashtable()
String mLineDelimiter = CRLF
boolean mMalformedHeader = false
String mMsgHeader = ""
String mStartLine = ""
String mVersion = ""

Static Protected Attributes

static final String p_METHOD = "(\\w+)"
static final String p_REASON_PHRASE = "(" + p_TEXT + ")"
static final String p_SP = " +"
static final String p_STATUS_CODE = "(\\d{3})"
static final String p_TEXT = "[^\\x00-\\x1f\\r\\n]*"
static final String p_URI = "([^\\r\\n]+)"
static final String p_VERSION = "(HTTP/\\d+\\.\\d+)"

Private Member Functions

void parseHostName (String hostHeader)

Private Attributes

String mHostName = ""
int mHostPort = 80
boolean mIsSecure = false
String mMethod = ""
URI mUri = null

Static Private Attributes

static final String DELIM = "<>#\""
static final String DELIM_UNWISE = DELIM + UNWISE
static final char[] DELIM_UNWISE_CHAR
static final Pattern patternHostHeader = Pattern.compile("([^:]+)\\s*?:?\\s*?(\\d*?)")
static final Pattern patternImage = Pattern.compile("\\.(jpg|jpeg|gif|tiff|tif|png)\\z", Pattern.CASE_INSENSITIVE)
static final Pattern patternPartialRequestLine = Pattern.compile("\\A *(OPTIONS|GET|HEAD|POST|PUT|DELETE|TRACE|CONNECT)\\b", Pattern.CASE_INSENSITIVE)
static final Pattern patternRequestLine = Pattern.compile(p_METHOD + p_SP + p_URI + p_SP + p_VERSION, Pattern.CASE_INSENSITIVE)
static final String UNWISE = "{}|\\^[]`"

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index