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

PHTTP Class Reference

#include <http.h>

Inheritance diagram for PHTTP:

PInternetProtocol PIndirectChannel PChannel PObject PHTTPClient PHTTPServer List of all members.

Public Types

enum  Commands {
  GET, HEAD, POST, PUT,
  DELETE, TRACE, OPTIONS, CONNECT,
  NumCommands
}
enum  StatusCode {
  Continue = 100, SwitchingProtocols, RequestOK = 200, Created,
  Accepted, NonAuthoritativeInformation, NoContent, ResetContent,
  PartialContent, MultipleChoices = 300, MovedPermanently, MovedTemporarily,
  SeeOther, NotModified, UseProxy, BadRequest = 400,
  UnAuthorised, PaymentRequired, Forbidden, NotFound,
  MethodNotAllowed, NoneAcceptable, ProxyAuthenticationRequired, RequestTimeout,
  Conflict, Gone, LengthRequired, UnlessTrue,
  InternalServerError = 500, NotImplemented, BadGateway, ServiceUnavailable,
  GatewayTimeout
}

Static Public Attributes

static const char *const AllowTag
static const char *const AuthorizationTag
static const char *const ContentEncodingTag
static const char *const ContentLengthTag
static const char *const ContentTypeTag
static const char *const DateTag
static const char *const ExpiresTag
static const char *const FromTag
static const char *const IfModifiedSinceTag
static const char *const LastModifiedTag
static const char *const LocationTag
static const char *const PragmaTag
static const char *const PragmaNoCacheTag
static const char *const RefererTag
static const char *const ServerTag
static const char *const UserAgentTag
static const char *const WWWAuthenticateTag
static const char *const MIMEVersionTag
static const char *const ConnectionTag
static const char *const KeepAliveTag
static const char *const TransferEncodingTag
static const char *const ChunkedTag
static const char *const ProxyConnectionTag
static const char *const ProxyAuthorizationTag
static const char *const ProxyAuthenticateTag
static const char *const ForwardedTag
static const char *const SetCookieTag
static const char *const CookieTag

Protected Member Functions

 PHTTP ()
virtual PINDEX ParseResponse (const PString &line)

Detailed Description

A common base class for TCP/IP socket for the HyperText Transfer Protocol version 1.0 client and server.


Member Enumeration Documentation

enum PHTTP::Commands
 

Enumeration values:
GET 
HEAD 
POST 
PUT 
DELETE 
TRACE 
OPTIONS 
CONNECT 
NumCommands 

enum PHTTP::StatusCode
 

Enumeration values:
Continue 
SwitchingProtocols 
RequestOK 
Created 
Accepted 
NonAuthoritativeInformation 
NoContent 
ResetContent 
PartialContent 
MultipleChoices 
MovedPermanently 
MovedTemporarily 
SeeOther 
NotModified 
UseProxy 
BadRequest 
UnAuthorised 
PaymentRequired 
Forbidden 
NotFound  Open fail due to device or file not found.
MethodNotAllowed 
NoneAcceptable 
ProxyAuthenticationRequired 
RequestTimeout 
Conflict 
Gone 
LengthRequired 
UnlessTrue 
InternalServerError 
NotImplemented 
BadGateway 
ServiceUnavailable 
GatewayTimeout 


Constructor & Destructor Documentation

PHTTP::PHTTP  )  [protected]
 

Create a TCP/IP HTTP protocol channel.


Member Function Documentation

virtual PINDEX PHTTP::ParseResponse const PString line  )  [protected, virtual]
 

Parse a response line string into a response code and any extra info on the line. Results are placed into the member variables lastResponseCode and lastResponseInfo.

The default bahaviour looks for a space or a '-' and splits the code and info either side of that character, then returns FALSE.

Returns:
Position of continuation character in response, 0 if no continuation lines are possible.

Reimplemented from PInternetProtocol.


Member Data Documentation

const char* const PHTTP::AllowTag [static]
 

const char* const PHTTP::AuthorizationTag [static]
 

const char* const PHTTP::ChunkedTag [static]
 

const char* const PHTTP::ConnectionTag [static]
 

const char* const PHTTP::ContentEncodingTag [static]
 

const char* const PHTTP::ContentLengthTag [static]
 

const char* const PHTTP::ContentTypeTag [static]
 

const char* const PHTTP::CookieTag [static]
 

const char* const PHTTP::DateTag [static]
 

const char* const PHTTP::ExpiresTag [static]
 

const char* const PHTTP::ForwardedTag [static]
 

const char* const PHTTP::FromTag [static]
 

const char* const PHTTP::IfModifiedSinceTag [static]
 

const char* const PHTTP::KeepAliveTag [static]
 

const char* const PHTTP::LastModifiedTag [static]
 

const char* const PHTTP::LocationTag [static]
 

const char* const PHTTP::MIMEVersionTag [static]
 

const char* const PHTTP::PragmaNoCacheTag [static]
 

const char* const PHTTP::PragmaTag [static]
 

const char* const PHTTP::ProxyAuthenticateTag [static]
 

const char* const PHTTP::ProxyAuthorizationTag [static]
 

const char* const PHTTP::ProxyConnectionTag [static]
 

const char* const PHTTP::RefererTag [static]
 

const char* const PHTTP::ServerTag [static]
 

const char* const PHTTP::SetCookieTag [static]
 

const char* const PHTTP::TransferEncodingTag [static]
 

const char* const PHTTP::UserAgentTag [static]
 

const char* const PHTTP::WWWAuthenticateTag [static]
 


The documentation for this class was generated from the following file:
Generated on Mon Feb 21 20:43:13 2005 for PWLib by  doxygen 1.4.1