#include <HttpRequestContext.h>
|
| | HttpRequestContext (const char *requestMethod=NULL, const char *rawUrl=NULL, const char *mappedFile=NULL, const char *serverName=NULL, const char *userId=NULL, const OsConnectionSocket *connection=NULL) |
| | Construct the context for an HTTP request. More...
|
| |
| virtual | ~HttpRequestContext () |
| |
| void | extractPostCgiVariables (const HttpBody &body) |
| |
| | HttpRequestContext (const HttpRequestContext &rHttpRequestContext) |
| |
| HttpRequestContext & | operator= (const HttpRequestContext &rhs) |
| |
| void | getEnvironmentVariable (enum RequestEnvironmentVariables envVariable, UtlString &value) const |
| |
| UtlBoolean | getCgiVariable (const char *name, UtlString &value, int occurance=0) const |
| |
| UtlBoolean | getCgiVariable (int index, UtlString &name, UtlString &value) const |
| | returns: TRUE/FALSE if the occurance of the named variable exists More...
|
| |
| bool | isEncrypted () const |
| | Test whether or not the client connection is encrypted. More...
|
| |
| bool | isTrustedPeer (const UtlString &peername) const |
| | Test whether or not the given name is the SSL client that sent this request. More...
|
| |
| typedef void(* UnEscapeFunction) (UtlString &) |
| Enumerator |
|---|
| HTTP_ENV_RAW_URL |
|
| HTTP_ENV_UNMAPPED_FILE |
|
| HTTP_ENV_MAPPED_FILE |
|
| HTTP_ENV_QUERY_STRING |
|
| HTTP_ENV_SERVER_NAME |
|
| HTTP_ENV_REQUEST_METHOD |
|
| HTTP_ENV_USER |
|
| HTTP_ENV_LAST |
|
| HttpRequestContext |
( |
const char * |
requestMethod = NULL, |
|
|
const char * |
rawUrl = NULL, |
|
|
const char * |
mappedFile = NULL, |
|
|
const char * |
serverName = NULL, |
|
|
const char * |
userId = NULL, |
|
|
const OsConnectionSocket * |
connection = NULL |
|
) |
| |
Construct the context for an HTTP request.
| void extractPostCgiVariables |
( |
const HttpBody & |
body | ) |
|
| void parseCgiVariables |
( |
const char * |
queryString, |
|
|
UtlList & |
cgiVariableList, |
|
|
const char * |
pairSeparator = "&", |
|
|
const char * |
namValueSeparator = "=", |
|
|
UtlBoolean |
nameIsCaseInsensitive = TRUE, |
|
|
UnEscapeFunction |
unescape = &HttpMessage::unescape |
|
) |
| |
|
static |
| UtlBoolean getCgiVariable |
( |
const char * |
name, |
|
|
UtlString & |
value, |
|
|
int |
occurance = 0 |
|
) |
| const |
| UtlBoolean getCgiVariable |
( |
int |
index, |
|
|
UtlString & |
name, |
|
|
UtlString & |
value |
|
) |
| const |
returns: TRUE/FALSE if the occurance of the named variable exists
| bool isEncrypted |
( |
| ) |
const |
Test whether or not the client connection is encrypted.
| bool isTrustedPeer |
( |
const UtlString & |
peername | ) |
const |
Test whether or not the given name is the SSL client that sent this request.
This tests the host identity provided by the SSL handshake; it does not test the HTTP user identity.
- Returns
- true if the connection is SSL and the peername matches a name in the peer certificate.
- false if not.