applications.webServer.httpPacketUtils
Class HttpRequest


public class HttpRequest


Field Summary
 private Stringbody
           
 private final static intEXPECTED_REQUEST_LINE_TOKEN_COUNT
           
 protected HashtableheaderFields
           
 private StringhttpVersion
           
 private booleanisWellFormed
           
 (package private) static CategoryLog
           
 private Stringmethod
           
 private StringparameterString
           
 private StringrequestUri
           

Constructor Summary
HttpRequest(InputStream httpRequestInputStream)
           

Method Summary
 StringgetBody()
           
 StringgetHttpVersion()
           
 booleangetIsWellFormed()
           
 StringgetMethod()
           
 StringgetParameterString()
           
 StringgetRequestUri()
           
 protected voidparseHttpRequest(InputStream httpRequestInputStream)
           
 protected voidparseRequestBody(BufferedReader httpRequestBufferedReader)
           
 protected voidparseRequestHeaderFields(BufferedReader httpRequestBufferedReader)
           Request Header Fields All acceptable header fields are currently parsed and stored.
 protected voidparseRequestLine(BufferedReader httpRequestBufferedReader)
           
 protected voidparseRequestUriWithParameters(String requestUriWithParameters)
           
 voidprintDebugInfo()
           

Field Detail

body

private String body

EXPECTED_REQUEST_LINE_TOKEN_COUNT

private final static int EXPECTED_REQUEST_LINE_TOKEN_COUNT

headerFields

protected Hashtable headerFields

httpVersion

private String httpVersion

isWellFormed

private boolean isWellFormed

Log

static Category Log

method

private String method

parameterString

private String parameterString

requestUri

private String requestUri
Constructor Detail

HttpRequest

public HttpRequest(InputStream httpRequestInputStream)
Method Detail

getBody

public String getBody()

getHttpVersion

public String getHttpVersion()

getIsWellFormed

public boolean getIsWellFormed()

getMethod

public String getMethod()

getParameterString

public String getParameterString()

getRequestUri

public String getRequestUri()

parseHttpRequest

protected void parseHttpRequest(InputStream httpRequestInputStream)

parseRequestBody

protected void parseRequestBody(BufferedReader httpRequestBufferedReader)

parseRequestHeaderFields

protected void parseRequestHeaderFields(BufferedReader httpRequestBufferedReader)

Request Header Fields

All acceptable header fields are currently parsed and stored.

Acceptable request header fields are:

The following general header fields are also acceptable: The following entity header fields are also acceptable: Finally, entity header fields allow an extensible header field in the form:
field-name ":" [ field-value ]

parseRequestLine

protected void parseRequestLine(BufferedReader httpRequestBufferedReader)

parseRequestUriWithParameters

protected void parseRequestUriWithParameters(String requestUriWithParameters)

printDebugInfo

public void printDebugInfo()