#include <http.h>
Inheritance diagram for PHTTPResource:
Public Member Functions | |
virtual | ~PHTTPResource () |
const PURL & | GetURL () const |
const PString & | GetContentType () const |
PHTTPAuthority * | GetAuthority () const |
void | SetAuthority (const PHTTPAuthority &auth) |
void | ClearAuthority () |
DWORD | GetHitCount () const |
void | ClearHitCount () |
virtual BOOL | OnGET (PHTTPServer &server, const PURL &url, const PMIMEInfo &info, const PHTTPConnectionInfo &conInfo) |
virtual BOOL | OnGETData (PHTTPServer &server, const PURL &url, const PHTTPConnectionInfo &connectInfo, PHTTPRequest &request) |
virtual BOOL | OnHEAD (PHTTPServer &server, const PURL &url, const PMIMEInfo &info, const PHTTPConnectionInfo &conInfo) |
virtual BOOL | OnPOST (PHTTPServer &server, const PURL &url, const PMIMEInfo &info, const PStringToString &data, const PHTTPConnectionInfo &conInfo) |
virtual BOOL | OnPOSTData (PHTTPRequest &request, const PStringToString &data) |
virtual BOOL | IsModifiedSince (const PTime &when) |
virtual BOOL | GetExpirationDate (PTime &when) |
virtual PHTTPRequest * | CreateRequest (const PURL &url, const PMIMEInfo &inMIME, const PMultipartFormInfoArray &multipartFormInfo, PHTTPServer &socket) |
virtual BOOL | LoadHeaders (PHTTPRequest &request)=0 |
virtual void | SendData (PHTTPRequest &request) |
virtual BOOL | LoadData (PHTTPRequest &request, PCharArray &data) |
virtual PString | LoadText (PHTTPRequest &request) |
virtual void | OnLoadedText (PHTTPRequest &request, PString &text) |
virtual BOOL | Post (PHTTPRequest &request, const PStringToString &data, PHTML &replyMessage) |
Protected Member Functions | |
PHTTPResource (const PURL &url) | |
PHTTPResource (const PURL &url, const PHTTPAuthority &auth) | |
PHTTPResource (const PURL &url, const PString &contentType) | |
PHTTPResource (const PURL &url, const PString &contentType, const PHTTPAuthority &auth) | |
virtual BOOL | CheckAuthority (PHTTPServer &server, const PHTTPRequest &request, const PHTTPConnectionInfo &conInfo) |
virtual BOOL | OnGETOrHEAD (PHTTPServer &server, const PURL &url, const PMIMEInfo &info, const PHTTPConnectionInfo &conInfo, BOOL IsGet) |
Static Protected Member Functions | |
BOOL | CheckAuthority (PHTTPAuthority &authority, PHTTPServer &server, const PHTTPRequest &request, const PHTTPConnectionInfo &connectInfo) |
Protected Attributes | |
PURL | baseURL |
Base URL for the resource, may accept URLS with a longer hierarchy. | |
PString | contentType |
MIME content type for the resource. | |
PHTTPAuthority * | authority |
Authorisation method for the resource. | |
volatile DWORD | hitCount |
COunt of number of times resource was accessed. |
|
|
|
|
|
|
|
|
|
|
|
|
|
See if the resource is authorised given the mime info Reimplemented in PHTTPDirectory. |
|
Set the current authority for the resource to unrestricted. |
|
|
|
Create a new request block for this type of resource. The default behaviour is to create a new PHTTPRequest instance.
Reimplemented in PHTTPFile, and PHTTPDirectory. |
|
Get the current authority for the resource.
|
|
Get the current content type for the resource.
|
|
Get a block of data (eg HTML) that the resource contains.
Reimplemented in PConfigPage, PConfigSectionsPage, PServiceHTTPString, PServiceHTTPFile, and PServiceHTTPDirectory. |
|
Get the current hit count for the resource. This is the total number of times the resource was asked for by a remote client.
|
|
Get the URL for this resource.
|
|
Check to see if the resource has been modified since the date specified.
|
|
Get a block of data that the resource contains. The default behaviour is to call the #LoadText()# function and if successful, call the #OnLoadedText()# function.
Reimplemented in PHTTPFile, and PHTTPTailFile. |
|
Get the headers for block of data (eg HTML) that the resource contains. This will fill in all the fields of the
Implemented in PHTTPString, PHTTPFile, PHTTPTailFile, PHTTPDirectory, and PXMLRPCServerResource. |
|
Get a block of text data (eg HTML) that the resource contains. The default behaviour is to assert, one of #LoadText()# or #LoadData()# functions must be overridden for correct operation.
Reimplemented in PHTTPString, PHTTPFile, PHTTPDirectory, PRegisterPage, and PServiceHTTPString. |
|
Handle the GET command passed from the HTTP socket. The default action is to check the authorisation for the resource and call the virtuals #LoadHeaders()# and #OnGETData()# to get a resource to be sent to the socket.
|
|
Send the data associated with a GET command. The default action calls #SendData()#.
|
|
common code for GET and HEAD commands |
|
Handle the HEAD command passed from the HTTP socket. The default action is to check the authorisation for the resource and call the virtual #LoadHeaders()# to get the header information to be sent to the socket.
|
|
This is called after the text has been loaded and may be used to customise or otherwise mangle a loaded piece of text. Typically this is used with HTML responses. The default action for this function is to do nothing. Reimplemented in PHTTPForm, PHTTPConfig, PHTTPConfigSectionList, PConfigPage, PConfigSectionsPage, PRegisterPage, PServiceHTTPFile, and PServiceHTTPDirectory. |
|
Handle the POST command passed from the HTTP socket. The default action is to check the authorisation for the resource and call the virtual #Post()# function to handle the data being received.
Reimplemented in PConfigPage, and PConfigSectionsPage. |
|
Send the data associated with a POST command. The default action calls #Post()#.
Reimplemented in PXMLRPCServerResource. |
|
Get a block of data (eg HTML) that the resource contains. The default action for this function is to do nothing and return success.
Reimplemented in PHTTPForm, PHTTPConfig, PHTTPConfigSectionList, PConfigPage, PConfigSectionsPage, and PRegisterPage. |
|
Send the data associated with a command. The default action is to call the virtual #LoadData()# to get a resource to be sent to the socket. |
|
Set the current authority for the resource. |
|
Authorisation method for the resource.
|
|
Base URL for the resource, may accept URLS with a longer hierarchy.
|
|
MIME content type for the resource.
|
|
COunt of number of times resource was accessed.
|