Genivia - ISAPI_HttpRequest Class Reference

|  | Home | Documentation | ISAPI_HttpRequest Class Reference updated Mon Feb 22 2016 |

- Main Page
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ISAPI_HttpRequest Class Reference

`#include <ISAPI_HttpContext.h>`

Inheritance diagram for ISAPI_HttpRequest:
[legend]
Collaboration diagram for ISAPI_HttpRequest:
[legend]

## Public Member Functions
| ISAPI_HttpRequest (EXTENSION_CONTROL_BLOCK *pECB=NULL)
virtual | ~ISAPI_HttpRequest ()
| destructor. More...
EXTENSION_CONTROL_BLOCK * | ECB () const
Public Member Functions inherited from HttpRequest
| HttpRequest ()
| constructor. More...
virtual | ~HttpRequest ()
| destructor. More...
virtual Method | getMethod () const
virtual const char * | getQueryString ()
virtual const char * | getBody ()
virtual void * | getData ()
virtual unsigned long | getContentLength () const
| return the lenght of the body of the request. More...
virtual bool | operator<< (std::istream &)
Public Member Functions inherited from HttpMessage
| HttpMessage ()
| constructor. More...
const ContentHeaders & | getContentHeaders () const
| return the content headers of the message. More...
ContentHeaders & | getContentHeaders ()
| return the content headers of the message. More...

## Protected Member Functions
void | ParseHeaders (EXTENSION_CONTROL_BLOCK &ecb)
| extract the request headers from the content block More...
bool | AddHeader (EXTENSION_CONTROL_BLOCK &ecb, const char *pszHeaderName, LPCTSTR pszVariableName)
bool | ReadHeader (EXTENSION_CONTROL_BLOCK &ecb, LPCTSTR pszVariableName, std::string &strHeaderValue)
void | ReadCustomHeaders (EXTENSION_CONTROL_BLOCK &ecb)

## Protected Attributes
bool | m_bHeadersParsed
| have the content headers already been parsed ? More...
EXTENSION_CONTROL_BLOCK * | m_pECB
Protected Attributes inherited from HttpMessage
ContentHeaders | m_ContentHeaders
| the content headers. More...

## Additional Inherited Members
Public Types inherited from HttpRequest
enum | Method { GET = 0, POST = 1 }
Public Types inherited from HttpMessage
typedef std::map< std::string, std::string, casecmpless > | ContentHeaders
Public Attributes inherited from HttpRequest
std::string | _querystring
char * | _body
unsigned long | _contentlength
Method | _method

## Detailed Description

encapsulate special content header parsing if we are running on a non-standard server.

## Constructor & Destructor Documentation

ISAPI_HttpRequest::ISAPI_HttpRequest | ( | EXTENSION_CONTROL_BLOCK * | pECB = `NULL` | ) |

Constructor, parsing also content headers from the control block.

Parameters

  pECB | the ISAPI extension control block passed in by IIS.

ISAPI_HttpRequest::~ISAPI_HttpRequest | ( |  | ) |
| virtual

destructor.

## Member Function Documentation

bool ISAPI_HttpRequest::AddHeader | ( | EXTENSION_CONTROL_BLOCK & | ecb,
|  | const char * | pszHeaderName,
|  | LPCTSTR | pszVariableName
| ) |  |
| protected

add a ECB header variable to our content headers collection.

Parameters

  ecb | the extension control block of the current IIS request
  pszHeaderName | the HTTP - standard name of the content header.
  pszVariableName | the name invented by Micro$oft for the same thing.

EXTENSION_CONTROL_BLOCK * ISAPI_HttpRequest::ECB | ( |  | ) | const

void ISAPI_HttpRequest::ParseHeaders | ( | EXTENSION_CONTROL_BLOCK & | ecb | ) |
| protected

extract the request headers from the content block

void ISAPI_HttpRequest::ReadCustomHeaders | ( | EXTENSION_CONTROL_BLOCK & | ecb | ) |
| protected

read all HTTP headers that were not already parsed into one of the ISAPI - ECB variables.

bool ISAPI_HttpRequest::ReadHeader | ( | EXTENSION_CONTROL_BLOCK & | ecb,
|  | LPCTSTR | pszVariableName,
|  | std::string & | strHeaderValue
| ) |  |
| protected

Read a variable from the control block.

Parameters

  ecb | the Extension Control Block.
  pszVariableName | the name of the variable to read (output) the value of the variable

Returns
  true if the header was found.

## Member Data Documentation

bool ISAPI_HttpRequest::m_bHeadersParsed
| protected

have the content headers already been parsed ?

EXTENSION_CONTROL_BLOCK* ISAPI_HttpRequest::m_pECB
| protected

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

- ISAPI_HttpContext.h
- ISAPI_HttpContext.cpp