sipxtacklib  Version 3.3
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
HttpMessage Class Reference

HTTP message container. More...

#include <HttpMessage.h>

Inheritance diagram for HttpMessage:
Inheritance graph
[legend]

Public Types

enum  HttpEndpointEnum {
  SERVER = 0,
  PROXY
}
 

Public Member Functions

 HttpMessage (const char *messageBytes=NULL, int byteCount=-1)
 Construct from a string. More...
 
 HttpMessage (OsSocket *inSocket, int bufferSize=HTTP_DEFAULT_SOCKET_BUFFER_SIZE)
 Construct from reading from the given socket. More...
 
 HttpMessage (const HttpMessage &rHttpMessage)
 Copy constructor. More...
 
HttpMessageoperator= (const HttpMessage &rhs)
 Assignment operator. More...
 
virtual ~HttpMessage ()
 Destructor. More...
 
int get (Url &httpUrl, int maxWaitMilliSeconds, bool bPersistent=true)
 Do an HTTP GET on the given URL. More...
 
int get (Url &httpUrl, HttpMessage &request, int maxWaitMilliSeconds, bool bPersistent=false)
 Do an HTTP GET on the given URL. More...
 
OsStatus get (Url &httpUrl, int maxWaitMilliSeconds, GetDataCallbackProc callbackProc, void *optionalData=NULL, OsConnectionSocket **socket=NULL)
 Perform an HTTP GET on the specified URL and pass data to the specified callbackProc. More...
 
int read (OsSocket *inSocket, int bufferSize=HTTP_DEFAULT_SOCKET_BUFFER_SIZE, UtlString *externalBuffer=NULL, int maxContentLength=6000000)
 Read HTTP message from socket. More...
 
int readHeader (OsSocket *inSocket, UtlString &buffer)
 Will read bytes off the socket until the header of the message is believed received. More...
 
int readBody (OsSocket *inSocket, int length, GetDataCallbackProc callbackProc, void *optionalData)
 Read the body of the specified data and deliever via the callback proc. More...
 
UtlBoolean write (OsSocket *outSocket) const
 Write message to socket. More...
 
const char * getFirstHeaderLine () const
 
void setFirstHeaderLine (const char *newHeaderLine)
 Set the header line. More...
 
void setFirstHeaderLine (const char *subfields0, const char *subfield1, const char *subfield2)
 
void getFirstHeaderLinePart (int partIndex, UtlString *part, char separator=HEADER_LINE_PART_DELIMITER) const
 Get part of header line. More...
 
void getBytes (UtlString *bytes, int *length) const
 Get the bytes for the compete message. More...
 
void logTimeEvent (const char *eventName)
 
void dumpTimeLog () const
 
UtlBoolean isFirstSend () const
 
Transport state accessors
void setTransportTime (long timeStamp)
 
void touchTransportTime ()
 
long getTransportTime () const
 
void setResendDuration (int resendMSec)
 Used for transport to track reliably the last duration waited before resending. More...
 
int getResendDuration () const
 
int getTimesSent () const
 
void incrementTimesSent ()
 
void setTimesSent (int times=0)
 
void setSendProtocol (OsSocket::IpProtocolSocketType protocol=OsSocket::TCP)
 
OsSocket::IpProtocolSocketType getSendProtocol () const
 
void setFirstSent ()
 
void setSendAddress (const char *address, int port)
 
void getSendAddress (UtlString *address, int *port) const
 
void resetTransport ()
 
Request callback methods
OsMsgQ * getResponseListenerQueue () const
 Gets the queue on which responses from the same transaction are deposited. More...
 
void setResponseListenerQueue (OsMsgQ *requestListenerQueue)
 Sets the queue on which responses from the same transaction are deposited. More...
 
void * getResponseListenerData () const
 Gets the data item to pass to the request listener. More...
 
void setResponseListenerData (void *requestListenerData)
 Sets the data item to pass to the request listener. More...
 
Generic header accessors
int getCountHeaderFields (const char *name=NULL) const
 Find the number of occurrences of header fields with the given name. More...
 
const char * getHeaderValue (int index, const char *name=NULL) const
 Get the value of the header field (i.e. second header line). More...
 
void setHeaderValue (const char *name, const char *newValue, int index=0)
 Sets the value of an existing header field. More...
 
void addHeaderField (const char *name, const char *value)
 Adds a new header line. More...
 
void insertHeaderField (const char *name, const char *value, int index=0)
 Inserts a new header line, shifting existing headers at and after the secified location down by one. More...
 
UtlBoolean removeHeader (const char *name, int index)
 
Specialized header field accessors

Remove a header field and value

Parameters
name- optional header field name NULL if indexing directly
index- header number or index into headers having the given name if provided
void setContentType (const char *contentTypeString, const char *accessType=NULL, const char *expirationDate=NULL, const char *url=NULL, int size=-1, const char *hash=NULL)
 
UtlBoolean getContentType (UtlString *contentType, UtlHashMap *parameters=NULL) const
 
void setContentLength (int contentLength)
 
int getContentLength () const
 
void setUserAgentField (const char *userAgentFieldValue)
 
void getUserAgentField (UtlString *userAgentFieldValue) const
 
void setRefresh (int seconds, const char *refreshUrl=NULL)
 
UtlBoolean getDateField (long *epochDate) const
 
void setDateField ()
 Sets the date field to the current time. More...
 
void setAcceptLanguageField (const char *acceptLanaguageFieldValue)
 
void getAcceptLanguageField (UtlString *acceptLanaguageFieldValue) const
 
UtlBoolean getAcceptField (UtlString &acceptValue) const
 
void setLocationField (const char *locationField)
 
Message body accessors
const HttpBodygetBody () const
 Get the body section of the message. More...
 
void setBody (HttpBody *newBody)
 Attach the body section of the message. More...
 
Response first header line access methods
void setResponseFirstHeaderLine (const char *protocol, int statusCode, const char *statusText)
 
void getResponseProtocol (UtlString *protocol) const
 Get this response's message protocol. More...
 
int getResponseStatusCode () const
 Get this response's status code. More...
 
void getResponseStatusText (UtlString *text) const
 Get this response's status code text. More...
 
Request first header line access methods
void setRequestFirstHeaderLine (const char *method, const char *uri, const char *protocol)
 
void getRequestMethod (UtlString *method) const
 Get this request's method. More...
 
void getRequestUri (UtlString *uri) const
 Get this request's URI. More...
 
void getRequestProtocol (UtlString *protocol) const
 Get this request's application layer protocol type. More...
 
void changeRequestUri (const char *newUri)
 Change this request's URI. More...
 

Static Public Member Functions

static void cannonizeToken (UtlString &token)
 Converts the given token to initial cap capitialization in the style used in RFC 822 header names. More...
 
static void unescape (UtlString &escapedText)
 URL unescape the text to human readable form. More...
 
static void escapeChars (UtlString &unEscapedText, UtlString &tobeEscapedChars)
 Selectively URL escape the text if they are contained in tobeEscapedChars. More...
 
static void escape (UtlString &unEscapedText)
 URL sscape the text. More...
 
static void escapeOneChar (UtlString &unEscapedText, char tobeEscapedChar)
 Selectively URL escape the text if the char is tobeEscapedChar. More...
 
static int getHttpMessageCount ()
 
static UtlBoolean isWholeMessage (const char *messageBuffer, int bufferLength, int &numberBytesChecked, int &contentLength)
 

Static Public Attributes

static OsAtomicInt smHttpMessageCount
 

Protected Attributes

UtlDList mNameValues
 
UtlString mFirstHeaderLine
 
UtlBoolean mHeaderCacheClean
 

Construction helper methods

These methods are mostly for internal use as utilities to the constructor methods

int parseFirstLine (const char *messageBytes, int byteCount)
 Parse the first line of the request or response. More...
 
void parseMessage (const char *messageBytes, int byteCount)
 Parse the message from a byte buffer. More...
 
void parseBody (const char *messageBodyBytes, int byteCount)
 Parses the bytes into a single or multipart body. More...
 
static int parseHeaders (const char *headerBytes, int messageLength, UtlDList &headerNameValues)
 returns: the number of bytes parsed More...
 
static int findHeaderEnd (const char *messageBytes, int messageLength)
 returns: the number of bytes in the message buffer which constitue the message header More...
 

Authentication access methods

UtlBoolean getAuthenticationScheme (UtlString *scheme, int authorizationEntity) const
 
UtlBoolean getAuthenticationData (UtlString *scheme, UtlString *realm, UtlString *nonce, UtlString *opaque, UtlString *algorithm, UtlString *qop, int authorizationEntity) const
 
void setAuthenticationData (const char *scheme, const char *realm, const char *nonce, const char *opaque, const char *domain=NULL, enum HttpEndpointEnum authEntity=SERVER)
 
void addAuthenticationField (const char *authenticationField, enum HttpEndpointEnum authType)
 
UtlBoolean getAuthenticationField (int index, enum HttpEndpointEnum authEntity, const char *authenticationField) const
 
void addAuthenticationField (const char *AuthorizeField, const char *AuthorizeValue, UtlBoolean otherAuthentications=TRUE)
 
virtual void setRequestUnauthorized (const HttpMessage *request, const char *authenticationScheme, const char *authenticationRealm, const char *authenticationNonce=NULL, const char *authenticationOpaque=NULL, const char *authenticationDomain=NULL)
 
UtlBoolean getAuthorizationUser (UtlString *userId) const
 
UtlBoolean getAuthorizationScheme (UtlString *scheme) const
 
UtlBoolean getAuthorizationField (UtlString *authenticationField, int authorizationEntity) const
 
void setBasicAuthorization (const char *user, const char *password, int authorizationEntity)
 
UtlBoolean getBasicAuthorizationData (UtlString *encodedCookie) const
 
UtlBoolean getBasicAuthorizationData (UtlString *userId, UtlString *password) const
 
UtlBoolean verifyBasicAuthorization (const char *user, const char *password) const
 
void setDigestAuthorizationData (const char *user, const char *realm, const char *nonce, const char *uri, const char *response, const char *algorithm, const char *cnonce, const char *opaque, const char *qop, int nonceCount, int authorizationEntity)
 
UtlBoolean getDigestAuthorizationData (UtlString *user, UtlString *realm=NULL, UtlString *nonce=NULL, UtlString *opaque=NULL, UtlString *response=NULL, UtlString *uri=NULL, int authorizationEntity=HttpMessage::PROXY, int index=0) const
 
UtlBoolean verifyMd5Authorization (const char *userId, const char *password, const char *nonce, const char *realm, const char *thisMessageMethod=NULL, const char *thisMessageUri=NULL, enum HttpEndpointEnum authEntity=SERVER) const
 
UtlBoolean verifyMd5Authorization (const char *userPasswordDigest, const char *nonce, const char *thisMessageMethod=NULL, const char *thisMessageUri=NULL) const
 
static void buildBasicAuthorizationCookie (const char *user, const char *password, UtlString *cookie)
 
static void buildMd5UserPasswordDigest (const char *user, const char *realm, const char *password, UtlString &userPasswordDigest)
 
static void buildMd5Digest (const char *userPasswordDigest, const char *algorithm, const char *nonce, const char *cnonce, int nonceCount, const char *qop, const char *method, const char *uri, const char *bodyDigest, UtlString *responseToken)
 

Detailed Description

HTTP message container.

This class is the container with methods for manipulation of a generic HTTP message. The message is composed of three parts:

  1. The first header line
  2. header fields and values (RFC 822 style)
  3. the optional body (HttpBody)
    The first header line is composed of three white space delimited parts. The meaning of these parts depends upon whether the the message is a request or a response. Aside from the first header line, the syntactic and symantic differences are very message specific so a design decision was made to not use different subclasses for requests and responses. This also avoids the multiple inheritance complexity that occurs if you create subclasses for requests, responses and other message types like SipMessage which also have requests and responses.
    The first header line parts can be accessed as follows:

Member Enumeration Documentation

Enumerator
SERVER 
PROXY 

Constructor & Destructor Documentation

HttpMessage ( const char *  messageBytes = NULL,
int  byteCount = -1 
)

Construct from a string.

HttpMessage ( OsSocket *  inSocket,
int  bufferSize = HTTP_DEFAULT_SOCKET_BUFFER_SIZE 
)

Construct from reading from the given socket.

HttpMessage ( const HttpMessage rHttpMessage)

Copy constructor.

~HttpMessage ( )
virtual

Destructor.

Member Function Documentation

HttpMessage & operator= ( const HttpMessage rhs)

Assignment operator.

int get ( Url httpUrl,
int  maxWaitMilliSeconds,
bool  bPersistent = true 
)

Do an HTTP GET on the given URL.

Parameters
httpUrl- the url to get from the HTTP server. The URL may contain a password & user id.
maxWaitMillSeconds- the maximum time to wait for the response
bPersistent- use persistent connections if true
int get ( Url httpUrl,
HttpMessage request,
int  maxWaitMilliSeconds,
bool  bPersistent = false 
)

Do an HTTP GET on the given URL.

Parameters
httpUrl- the url to get from the HTTP server. The URL may contain a password & user id. Note the only thing that may be required of the URL is the host and port as well as the user ID and password if there is a authentication challenge.
request- the complete HTTP request that will be sent to the HTTP server including the body.
maxWaitMillSeconds- the maximum time to wait for the response
bPersistent- use persistent connections if true
OsStatus get ( Url httpUrl,
int  maxWaitMilliSeconds,
GetDataCallbackProc  callbackProc,
void *  optionalData = NULL,
OsConnectionSocket **  socket = NULL 
)

Perform an HTTP GET on the specified URL and pass data to the specified callbackProc.

Note
If you specify a socket pointer, YOU ARE RESPONSIBLE for closing and deleting the socket!
Parameters
httpUrl- The url to get from the HTTP server. The URL may contain a password & user id.
maxWaitMillSeconds- The maximum time to wait for the response.
callbackProc- Callback routine that will be invoked with the body data.
optionalData- Optional data passed to callbackProc
socket- Socket used to fetch data. This is set before any data is pumped, however, if you specify this socket, it is the caller's responsibility to delete the OsSocket.
int read ( OsSocket *  inSocket,
int  bufferSize = HTTP_DEFAULT_SOCKET_BUFFER_SIZE,
UtlString *  externalBuffer = NULL,
int  maxContentLength = 6000000 
)

Read HTTP message from socket.

Convenience function to read from a socket

Parameters
inSocket- socket from which to read data
bufferSize- this is the size of the chunks of data to be read off the socket. (It is not the total size of the message to be read.)
externalBuffer- a UtlString into which the HTTP message will be accumulated and via which it will be returned to the caller. If this is NULL, the message is not returned. If externalBuffer contains a string, it is taken as the initial part of the HTTP message, to be followed by data read from inSocket.
maxContentLength- this is the maximum message size that will be read. If the message content-length is larger, the socket is closed and the buffer is cleared. (This is to protect against abusive senders.)
Returns
the number of bytes in the message that was read, or 0 to indicate an error. If it is less than externalBuffer.length(), the remaining bytes are the start of another message.
int readHeader ( OsSocket *  inSocket,
UtlString &  buffer 
)

Will read bytes off the socket until the header of the message is believed received.

int readBody ( OsSocket *  inSocket,
int  length,
GetDataCallbackProc  callbackProc,
void *  optionalData 
)

Read the body of the specified data and deliever via the callback proc.

UtlBoolean write ( OsSocket *  outSocket) const

Write message to socket.

Convenience function to write to a socket

Returns
TRUE if the message was written successfully
void cannonizeToken ( UtlString &  token)
static

Converts the given token to initial cap capitialization in the style used in RFC 822 header names.

void unescape ( UtlString &  escapedText)
static

URL unescape the text to human readable form.

void escapeChars ( UtlString &  unEscapedText,
UtlString &  tobeEscapedChars 
)
static

Selectively URL escape the text if they are contained in tobeEscapedChars.

void escape ( UtlString &  unEscapedText)
static

URL sscape the text.

void escapeOneChar ( UtlString &  unEscapedText,
char  tobeEscapedChar 
)
static

Selectively URL escape the text if the char is tobeEscapedChar.

int parseFirstLine ( const char *  messageBytes,
int  byteCount 
)

Parse the first line of the request or response.

void parseMessage ( const char *  messageBytes,
int  byteCount 
)

Parse the message from a byte buffer.

This method reads the top header line, header feilds and the message body if they are present from the buffer assuming HTTP stream format.

void parseBody ( const char *  messageBodyBytes,
int  byteCount 
)

Parses the bytes into a single or multipart body.

int parseHeaders ( const char *  headerBytes,
int  messageLength,
UtlDList &  headerNameValues 
)
static

returns: the number of bytes parsed

int findHeaderEnd ( const char *  messageBytes,
int  messageLength 
)
static

returns: the number of bytes in the message buffer which constitue the message header

The end of the headers is determined by the first blank line

int getHttpMessageCount ( )
static
const char * getFirstHeaderLine ( ) const
void setFirstHeaderLine ( const char *  newHeaderLine)

Set the header line.

Parameters
newHeaderLine- gets copied
void setFirstHeaderLine ( const char *  subfields0,
const char *  subfield1,
const char *  subfield2 
)
void getFirstHeaderLinePart ( int  partIndex,
UtlString *  part,
char  separator = HEADER_LINE_PART_DELIMITER 
) const

Get part of header line.

Parameters
partIndex- index into space delimited first header line
part
void setTransportTime ( long  timeStamp)
Note
: these are mostly only useful inside servers that keep message state. Used for transport reliablity to tack when this message was sent so that it may be resent or timed-out.
void touchTransportTime ( )
long getTransportTime ( ) const
void setResendDuration ( int  resendMSec)

Used for transport to track reliably the last duration waited before resending.

int getResendDuration ( ) const
int getTimesSent ( ) const
void incrementTimesSent ( )
void setTimesSent ( int  times = 0)
void setSendProtocol ( OsSocket::IpProtocolSocketType  protocol = OsSocket::TCP)
OsSocket::IpProtocolSocketType getSendProtocol ( ) const
void setFirstSent ( )
void setSendAddress ( const char *  address,
int  port 
)
void getSendAddress ( UtlString *  address,
int *  port 
) const
void resetTransport ( )
OsMsgQ * getResponseListenerQueue ( ) const

Gets the queue on which responses from the same transaction are deposited.

These methods are used to setup callback functions and data which gets triggered when a response comes back

void setResponseListenerQueue ( OsMsgQ *  requestListenerQueue)

Sets the queue on which responses from the same transaction are deposited.

void * getResponseListenerData ( ) const

Gets the data item to pass to the request listener.

void setResponseListenerData ( void *  requestListenerData)

Sets the data item to pass to the request listener.

int getCountHeaderFields ( const char *  name = NULL) const

Find the number of occurrences of header fields with the given name.

Note
many specific header type accessors exist to parse headers which have syntax that is not a simple token or string
const char * getHeaderValue ( int  index,
const char *  name = NULL 
) const

Get the value of the header field (i.e. second header line).

Parameters
index- index into the header fields or if name is not null the index into the set of header fields having the given name
name- string containing the name of the header field
Returns
read only string if a header field exist
null if no header field is found
void setHeaderValue ( const char *  name,
const char *  newValue,
int  index = 0 
)

Sets the value of an existing header field.

If the given name does not exist it creates a new one

Parameters
name- header field name
newValue- the value which gets set for the field
index- the index into the number of fields with the given name
Note
value is copied
void addHeaderField ( const char *  name,
const char *  value 
)

Adds a new header line.

Parameters
name- header field name
value- the value which gets set for the field
Note
name and value are copied
void insertHeaderField ( const char *  name,
const char *  value,
int  index = 0 
)

Inserts a new header line, shifting existing headers at and after the secified location down by one.

Parameters
name- header field name
value- the value which gets set for the field
index- the location to insert in the list (first by default)
Note
name and value are copied
UtlBoolean removeHeader ( const char *  name,
int  index 
)
void setContentType ( const char *  contentTypeString,
const char *  accessType = NULL,
const char *  expirationDate = NULL,
const char *  url = NULL,
int  size = -1,
const char *  hash = NULL 
)
UtlBoolean getContentType ( UtlString *  contentType,
UtlHashMap *  parameters = NULL 
) const
void setContentLength ( int  contentLength)
int getContentLength ( ) const
void setUserAgentField ( const char *  userAgentFieldValue)
void getUserAgentField ( UtlString *  userAgentFieldValue) const
void setRefresh ( int  seconds,
const char *  refreshUrl = NULL 
)
UtlBoolean getDateField ( long *  epochDate) const
void setDateField ( )

Sets the date field to the current time.

void setAcceptLanguageField ( const char *  acceptLanaguageFieldValue)
void getAcceptLanguageField ( UtlString *  acceptLanaguageFieldValue) const
UtlBoolean getAcceptField ( UtlString &  acceptValue) const
void setLocationField ( const char *  locationField)
const HttpBody * getBody ( ) const

Get the body section of the message.

void setBody ( HttpBody newBody)

Attach the body section of the message.

The body is NOT copied this message instance destructor will call delete on body pointer

void getBytes ( UtlString *  bytes,
int *  length 
) const

Get the bytes for the compete message.

Suitable for streaming or sending over a socket

Parameters
bytes- gets allocated and must be freed
length- the length of bytes
UtlBoolean getAuthenticationScheme ( UtlString *  scheme,
int  authorizationEntity 
) const
UtlBoolean getAuthenticationData ( UtlString *  scheme,
UtlString *  realm,
UtlString *  nonce,
UtlString *  opaque,
UtlString *  algorithm,
UtlString *  qop,
int  authorizationEntity 
) const
void setAuthenticationData ( const char *  scheme,
const char *  realm,
const char *  nonce,
const char *  opaque,
const char *  domain = NULL,
enum HttpEndpointEnum  authEntity = SERVER 
)
void addAuthenticationField ( const char *  authenticationField,
enum HttpEndpointEnum  authType 
)
UtlBoolean getAuthenticationField ( int  index,
enum HttpEndpointEnum  authEntity,
const char *  authenticationField 
) const
void addAuthenticationField ( const char *  AuthorizeField,
const char *  AuthorizeValue,
UtlBoolean  otherAuthentications = TRUE 
)
void buildBasicAuthorizationCookie ( const char *  user,
const char *  password,
UtlString *  cookie 
)
static
void setRequestUnauthorized ( const HttpMessage request,
const char *  authenticationScheme,
const char *  authenticationRealm,
const char *  authenticationNonce = NULL,
const char *  authenticationOpaque = NULL,
const char *  authenticationDomain = NULL 
)
virtual
UtlBoolean getAuthorizationUser ( UtlString *  userId) const
UtlBoolean getAuthorizationScheme ( UtlString *  scheme) const
UtlBoolean getAuthorizationField ( UtlString *  authenticationField,
int  authorizationEntity 
) const
void setBasicAuthorization ( const char *  user,
const char *  password,
int  authorizationEntity 
)
UtlBoolean getBasicAuthorizationData ( UtlString *  encodedCookie) const
UtlBoolean getBasicAuthorizationData ( UtlString *  userId,
UtlString *  password 
) const
UtlBoolean verifyBasicAuthorization ( const char *  user,
const char *  password 
) const
void setDigestAuthorizationData ( const char *  user,
const char *  realm,
const char *  nonce,
const char *  uri,
const char *  response,
const char *  algorithm,
const char *  cnonce,
const char *  opaque,
const char *  qop,
int  nonceCount,
int  authorizationEntity 
)
UtlBoolean getDigestAuthorizationData ( UtlString *  user,
UtlString *  realm = NULL,
UtlString *  nonce = NULL,
UtlString *  opaque = NULL,
UtlString *  response = NULL,
UtlString *  uri = NULL,
int  authorizationEntity = HttpMessage::PROXY,
int  index = 0 
) const
void buildMd5UserPasswordDigest ( const char *  user,
const char *  realm,
const char *  password,
UtlString &  userPasswordDigest 
)
static
void buildMd5Digest ( const char *  userPasswordDigest,
const char *  algorithm,
const char *  nonce,
const char *  cnonce,
int  nonceCount,
const char *  qop,
const char *  method,
const char *  uri,
const char *  bodyDigest,
UtlString *  responseToken 
)
static
UtlBoolean verifyMd5Authorization ( const char *  userId,
const char *  password,
const char *  nonce,
const char *  realm,
const char *  thisMessageMethod = NULL,
const char *  thisMessageUri = NULL,
enum HttpEndpointEnum  authEntity = SERVER 
) const
UtlBoolean verifyMd5Authorization ( const char *  userPasswordDigest,
const char *  nonce,
const char *  thisMessageMethod = NULL,
const char *  thisMessageUri = NULL 
) const
void setResponseFirstHeaderLine ( const char *  protocol,
int  statusCode,
const char *  statusText 
)
void getResponseProtocol ( UtlString *  protocol) const

Get this response's message protocol.

int getResponseStatusCode ( ) const

Get this response's status code.

void getResponseStatusText ( UtlString *  text) const

Get this response's status code text.

void setRequestFirstHeaderLine ( const char *  method,
const char *  uri,
const char *  protocol 
)
void getRequestMethod ( UtlString *  method) const

Get this request's method.

void getRequestUri ( UtlString *  uri) const

Get this request's URI.

void getRequestProtocol ( UtlString *  protocol) const

Get this request's application layer protocol type.

void changeRequestUri ( const char *  newUri)

Change this request's URI.

void logTimeEvent ( const char *  eventName)
void dumpTimeLog ( ) const
UtlBoolean isWholeMessage ( const char *  messageBuffer,
int  bufferLength,
int &  numberBytesChecked,
int &  contentLength 
)
static
UtlBoolean isFirstSend ( ) const

Member Data Documentation

OsAtomicInt smHttpMessageCount
static
UtlDList mNameValues
protected
UtlString mFirstHeaderLine
protected
UtlBoolean mHeaderCacheClean
protected

sipXtackLib home page