Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

Http Class Reference

Inheritance diagram for Http:

Protocol Https List of all members.

Public Member Functions

int allowHTTPTRACE ()
int controlConnection (ConnectionPtr a, char *b1, char *b2, int bs1, int bs2, u_long nbtr, u_long id)
int deleteHTTPRESOURCE (string &filename, int yetMapped=0)
const char * getBrowseDirCSSFile ()
int getCGItimeout ()
const char * getDefaultFilenamePath (u_long ID)
int getFilePermissions (string &filename, string &directory, string &file, string &filenamePath, int yetmapped, int *permissions)
u_long getGzipThreshold ()
MimeRecordgetMIME (string &filename)
int getPath (string &filenamePath, const char *filename, int systemrequest)
int getPath (string &filenamePath, const string &filename, int systemrequest)
 Http ()
int logHTTPaccess ()
int optionsHTTPRESOURCE (string &filename, int yetMapped=0)
int preprocessHttpRequest (string &filename, int yetmapped, int *permissions)
int putHTTPRESOURCE (string &filename, int systemrequest=0, int onlyHeader=0, int yetMapped=0)
int raiseHTTPError (int ID)
virtual char * registerName (char *out, int len)
int requestAuthorization ()
int sendAuth ()
int sendHTTPhardError500 ()
int sendHTTPNonModified ()
int sendHTTPRedirect (const char *newURL)
int sendHTTPResource (string &filename, int systemrequest=0, int onlyHeader=0, int yetMapped=0)
int traceHTTPRESOURCE (string &filename, int yetMapped=0)
virtual ~Http ()

Static Public Member Functions

int getPath (HttpThreadContext *td, string &filenamePath, const char *filename, int systemrequest)
int getPath (HttpThreadContext *td, string &filenamePath, const string &filename, int systemrequest)
HttpStaticDatagetStaticData ()
int loadProtocolStatic (XmlParser *)
char * registerNameImpl (char *, int len)
int unLoadProtocolStatic (XmlParser *)

Protected Member Functions

u_long checkDigest ()
void clean ()
void computeDigest (char *, char *)

Protected Attributes

HttpDataHandlercgi
HttpDataHandlerfastcgi
HttpDataHandlerhttpDir
HttpDataHandlerhttpFile
HttpDataHandlerisapi
HttpDataHandlermscgi
string protocolPrefix
HttpDataHandlerscgi
HttpThreadContexttd
HttpDataHandlerwincgi

Constructor & Destructor Documentation

Http::Http  ) 
 

Constructor for the class http.

Http::~Http  )  [virtual]
 

Destructor for the http class.


Member Function Documentation

int Http::allowHTTPTRACE  ) 
 

Check if the host allows the HTTP TRACE command

u_long Http::checkDigest  )  [protected]
 

Check the Digest authorization

void Http::clean  )  [protected]
 

Clean the used memory.

void Http::computeDigest char *  out,
char *  buffer
[protected]
 

Compute the Digest outputting it to a buffer.

int Http::controlConnection ConnectionPtr  a,
char *  b1,
char *  b2,
int  bs1,
int  bs2,
u_long  nbtr,
u_long  id
[virtual]
 

This is the HTTP protocol main procedure to parse a request over HTTP.

Reimplemented from Protocol.

int Http::deleteHTTPRESOURCE string &  filename,
int  yetmapped = 0
 

Delete the resource identified by filename.

const char * Http::getBrowseDirCSSFile  ) 
 

Get the CSS file used in a browsed directory.

int Http::getCGItimeout  ) 
 

Get the timeout for the cgi.

const char * Http::getDefaultFilenamePath u_long  ID  ) 
 

Returns the default filename.

int Http::getFilePermissions string &  filename,
string &  directory,
string &  file,
string &  filenamePath,
int  yetmapped,
int *  permissions
 

Get the file permissions mask.

Parameters:
filename Resource to access.
yetmapped Is the resource mapped to the localfilesystem?
permissions Permission mask for this resource.

u_long Http::getGzipThreshold  ) 
 

Get the GZIP threshold.

MimeRecord * Http::getMIME string &  filename  ) 
 

Returns the MIME type passing its extension. Returns zero if the file is registered.

int Http::getPath HttpThreadContext td,
string &  filenamePath,
const char *  filename,
int  systemrequest
[static]
 

Map an URL to the machine file system. Return 200 on success. Any other return value is the HTTP error.

int Http::getPath HttpThreadContext td,
string &  filenamePath,
const string &  filename,
int  systemrequest
[static]
 

int Http::getPath string &  filenamePath,
const char *  filename,
int  systemrequest
 

int Http::getPath string &  filenamePath,
const string &  filename,
int  systemrequest
 

HttpStaticData * Http::getStaticData  )  [static]
 

Get a pointer to a structure shared among all the instances.

int Http::loadProtocolStatic XmlParser languageParser  )  [static]
 

Load the HTTP protocol.

Reimplemented in Https.

int Http::logHTTPaccess  ) 
 

Log the access using the Common Log Format or the Combined one.

int Http::optionsHTTPRESOURCE string &  filename,
int  yetMapped = 0
 

Build a response for an OPTIONS request.

int Http::preprocessHttpRequest string &  filename,
int  yetmapped,
int *  permissions
 

Preprocess a HTTP request.

Parameters:
filename Resource to access.
yetmapped Is the resource mapped to the localfilesystem?
permissions Permission mask for this resource.

int Http::putHTTPRESOURCE string &  filename,
int  systemrequest = 0,
int  onlyHeader = 0,
int  yetmapped = 0
 

Main function to handle the HTTP PUT command.

int Http::raiseHTTPError int  ID  ) 
 

Sends an error page to the client. Nonzero to keep the connection.

virtual char* Http::registerName char *  out,
int  len
[virtual]
 

Returns the name of the protocol. If an out buffer is defined fullfill it with the name too.

Reimplemented from Protocol.

Reimplemented in Https.

char * Http::registerNameImpl char *  out,
int  len
[static]
 

Returns the name of the protocol. If an out buffer is defined fullfill it with the name too.

Reimplemented in Https.

int Http::requestAuthorization  ) 
 

Send to the client an authorization request.

int Http::sendAuth  ) 
 

Send a 401 error.

int Http::sendHTTPhardError500  ) 
 

Send a hard wired 500 error when we have a system error

int Http::sendHTTPNonModified  ) 
 

Send a non-modified message to the client.

int Http::sendHTTPRedirect const char *  newURL  ) 
 

Send a redirect message to the client.

int Http::sendHTTPResource string &  uri,
int  systemrequest = 0,
int  onlyHeader = 0,
int  yetmapped = 0
 

Main function to send a resource to a client.

int Http::traceHTTPRESOURCE string &  filename,
int  yetMapped = 0
 

Handle the HTTP TRACE command.

int Http::unLoadProtocolStatic XmlParser languageParser  )  [static]
 

Unload the HTTP protocol.

Reimplemented in Https.


Member Data Documentation

HttpDataHandler* Http::cgi [protected]
 

HttpDataHandler* Http::fastcgi [protected]
 

HttpDataHandler* Http::httpDir [protected]
 

HttpDataHandler* Http::httpFile [protected]
 

HttpDataHandler* Http::isapi [protected]
 

HttpDataHandler* Http::mscgi [protected]
 

string Http::protocolPrefix [protected]
 

HttpDataHandler* Http::scgi [protected]
 

struct HttpThreadContext* Http::td [protected]
 

HttpDataHandler* Http::wincgi [protected]
 


Generated on Mon Jun 16 13:47:17 2008 for MyServer by  doxygen 1.3.9.1