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

ApacheRequestRec Class Reference

#include <cpp_request.h>

List of all members.

Public Member Functions

 ApacheRequestRec (request_rec *r, ApacheRequestRec *pPrev=NULL, ApacheRequestRec *pNext=NULL)
 ~ApacheRequestRec ()
apr_pool_t * pool ()
conn_rec * connection ()
ApacheServerRecserver ()
ApacheRequestRecnext ()
ApacheRequestRecprev ()
ApacheRequestRecmain ()
const char * the_request () const
int assbackwards () const
int proxyreq () const
int header_only () const
const char * protocol () const
int proto_num () const
const char * hostname () const
apr_time_t request_time () const
const char * status_line () const
int status () const
const char * method () const
int method_number () const
apr_int64_t allowed () const
 'allowed' is a bitvector of the allowed methods.
const apr_array_header_t * allowed_xmethods () const
const ap_method_list_t * allowed_methods () const
apr_off_t sent_bodyct () const
apr_off_t bytes_sent () const
apr_time_t mtime () const
int chunked () const
const char * range () const
apr_off_t clength () const
apr_off_t remaining () const
apr_off_t read_length () const
int read_body () const
int read_chunked () const
apr_table_t * headers_in () const
apr_table_t * headers_out () const
apr_table_t * err_headers_out () const
apr_table_t * subprocess_env () const
apr_table_t * notes () const
const char * content_type (char *type=NULL) const
const char * handler ()
const char * content_encoding ()
int discard_request_body ()
int get_client_block (char *buf, apr_size_t bufsiz)
const apr_array_header_t * content_languages () const
const char * vlist_validator () const
const char * user () const
const char * ap_auth_type () const
const char * unparsed_uri () const
const char * uri () const
const char * filename () const
const char * path_info () const
const char * args () const
int no_cache () const
int no_local_copy () const
apr_finfo_t finfo () const
apr_uri_t parsed_uri () const
void * get_dir_config (module *m)
void * get_server_config (module *m)
int get_basic_auth_pw (const char **sent_pw)
int rputc (int c)
int rputs (const char *str) const
int rwrite (const void *buf, int nbyte)
int rprintf (const char *fmt,...)
int rflush ()
int allow_options ()
int allow_overrides ()
const char * default_type ()
const char * document_root ()
const char * get_remote_logname ()
const char * get_server_name ()
void custom_response (int status, const char *str)
void internal_redirect (const char *new_uri)
void internal_redirect_handler (const char *new_uri)
int some_auth_required ()
int is_initial_req ()
void update_mtime (apr_time_t dependency_mtime)
void allow_methods (int reset,...)
void dump () const
string dump_string () const
string table_string (const apr_table_t *pTable) const
void dump_table (const apr_table_t *pTable) const
request_rec * get_request_rec ()

Private Member Functions

string istring (int value, const char *format="%d") const
string mstring (const char *cp) const

Private Attributes

request_rec * mRequest
ApacheRequestRecmPrev
ApacheRequestRecmNext
ApacheRequestRecmMain
ApacheServerRecmServer


Constructor & Destructor Documentation

ApacheRequestRec::ApacheRequestRec request_rec *  r,
ApacheRequestRec pPrev = NULL,
ApacheRequestRec pNext = NULL
 

ApacheRequestRec::~ApacheRequestRec  ) 
 


Member Function Documentation

void ApacheRequestRec::allow_methods int  reset,
  ...
 

int ApacheRequestRec::allow_options  )  [inline]
 

int ApacheRequestRec::allow_overrides  )  [inline]
 

apr_int64_t ApacheRequestRec::allowed  )  const [inline]
 

'allowed' is a bitvector of the allowed methods.

A handler must ensure that the request method is one that it is capable of handling. Generally modules should DECLINE any request methods they do not handle. Prior to aborting the handler like this the handler should set r->allowed to the list of methods that it is willing to handle. This bitvector is used to construct the "Allow:" header required for OPTIONS requests, and HTTP_METHOD_NOT_ALLOWED and HTTP_NOT_IMPLEMENTED status codes.

Since the default_handler deals with OPTIONS, all modules can usually decline to deal with OPTIONS. TRACE is always allowed, modules don't need to set it explicitly.

Since the default_handler will always handle a GET, a module which does *not* implement GET should probably return HTTP_METHOD_NOT_ALLOWED. Unfortunately this means that a Script GET handler can't be installed by mod_actions.

Returns:
A bit vector of allowed methods

const ap_method_list_t* ApacheRequestRec::allowed_methods  )  const [inline]
 

Returns:
List of allowed methods

const apr_array_header_t* ApacheRequestRec::allowed_xmethods  )  const [inline]
 

Returns:
Array of extension methods

const char* ApacheRequestRec::ap_auth_type  )  const [inline]
 

const char* ApacheRequestRec::args  )  const [inline]
 

int ApacheRequestRec::assbackwards  )  const [inline]
 

Returns:
HTTP/0.9, "simple" request (e.g. GET /foo w/no headers)

apr_off_t ApacheRequestRec::bytes_sent  )  const [inline]
 

Returns:
byte count of the body

int ApacheRequestRec::chunked  )  const [inline]
 

Returns:
sending chunked transfer-coding

apr_off_t ApacheRequestRec::clength  )  const [inline]
 

Returns:
The so-called 'real' content length

conn_rec* ApacheRequestRec::connection  )  [inline]
 

Returns:
The connection associated with the request

const char* ApacheRequestRec::content_encoding  )  [inline]
 

Returns:
How to encode the data

const apr_array_header_t* ApacheRequestRec::content_languages  )  const [inline]
 

Returns:
Array of strings representing content languages

const char* ApacheRequestRec::content_type char *  type = NULL  )  const [inline]
 

Returns:
The content type of the request

void ApacheRequestRec::custom_response int  status,
const char *  str
[inline]
 

const char* ApacheRequestRec::default_type  )  [inline]
 

int ApacheRequestRec::discard_request_body  )  [inline]
 

Returns:
Whether the request body will be discarded

const char* ApacheRequestRec::document_root  )  [inline]
 

void ApacheRequestRec::dump  )  const
 

string ApacheRequestRec::dump_string  )  const
 

void ApacheRequestRec::dump_table const apr_table_t *  pTable  )  const
 

apr_table_t* ApacheRequestRec::err_headers_out  )  const [inline]
 

Returns:
MIME headers from the response printed even on error

const char* ApacheRequestRec::filename  )  const [inline]
 

apr_finfo_t ApacheRequestRec::finfo  )  const [inline]
 

int ApacheRequestRec::get_basic_auth_pw const char **  sent_pw  ) 
 

int ApacheRequestRec::get_client_block char *  buf,
apr_size_t  bufsiz
[inline]
 

Returns:
Send blocking data to the client

void * ApacheRequestRec::get_dir_config module *  m  ) 
 

const char* ApacheRequestRec::get_remote_logname  )  [inline]
 

request_rec* ApacheRequestRec::get_request_rec  )  [inline]
 

void* ApacheRequestRec::get_server_config module *  m  ) 
 

const char* ApacheRequestRec::get_server_name  )  [inline]
 

const char* ApacheRequestRec::handler  )  [inline]
 

Returns:
the name of the handler assigned this request

int ApacheRequestRec::header_only  )  const [inline]
 

Returns:
HEAD request, as opposed to GET

apr_table_t* ApacheRequestRec::headers_in  )  const [inline]
 

Returns:
MIME headers from the request

apr_table_t* ApacheRequestRec::headers_out  )  const [inline]
 

Returns:
MIME headers from the response

const char* ApacheRequestRec::hostname  )  const [inline]
 

Returns:
Host, as set by full URI or Host:

void ApacheRequestRec::internal_redirect const char *  new_uri  )  [inline]
 

void ApacheRequestRec::internal_redirect_handler const char *  new_uri  )  [inline]
 

int ApacheRequestRec::is_initial_req  )  [inline]
 

string ApacheRequestRec::istring int  value,
const char *  format = "%d"
const [private]
 

utility functions for formatting

ApacheRequestRec* ApacheRequestRec::main  )  [inline]
 

Returns:
Pointer to the main request if this is a sub-request

const char* ApacheRequestRec::method  )  const [inline]
 

Returns:
Request method (eg. GET, HEAD, POST, etc.)

int ApacheRequestRec::method_number  )  const [inline]
 

Returns:
M_GET, M_POST, etc.

string ApacheRequestRec::mstring const char *  cp  )  const [private]
 

apr_time_t ApacheRequestRec::mtime  )  const [inline]
 

Returns:
Last modified time of the requested resource

ApacheRequestRec* ApacheRequestRec::next  )  [inline]
 

Returns:
Pointer to the redirected request if this is an external redirect

int ApacheRequestRec::no_cache  )  const [inline]
 

int ApacheRequestRec::no_local_copy  )  const [inline]
 

apr_table_t* ApacheRequestRec::notes  )  const [inline]
 

Returns:
Notes to pass from one module to another

apr_uri_t ApacheRequestRec::parsed_uri  )  const [inline]
 

const char* ApacheRequestRec::path_info  )  const [inline]
 

apr_pool_t* ApacheRequestRec::pool  )  [inline]
 

Returns:
The pool associated with the request

ApacheRequestRec* ApacheRequestRec::prev  )  [inline]
 

Returns:
Pointer to the previous request if this is an internal redirect

int ApacheRequestRec::proto_num  )  const [inline]
 

Returns:
Protocol version number of protocol; 1.1 = 1001

const char* ApacheRequestRec::protocol  )  const [inline]
 

Returns:
Protocol string, as given to us, or HTTP/0.9

int ApacheRequestRec::proxyreq  )  const [inline]
 

Returns:
A proxy request (calculated during post_read_request/translate_name) possible values PROXYREQ_NONE, PROXYREQ_PROXY, PROXYREQ_REVERSE, PROXYREQ_RESPONSE

const char* ApacheRequestRec::range  )  const [inline]
 

Returns:
The HTTP range header value

int ApacheRequestRec::read_body  )  const [inline]
 

Returns:
Method for reading the request body (e.g. REQUEST_CHUNKED_ERROR)

int ApacheRequestRec::read_chunked  )  const [inline]
 

Returns:
Reading chunked encoding

apr_off_t ApacheRequestRec::read_length  )  const [inline]
 

Returns:
Number of bytes already read from the request

apr_off_t ApacheRequestRec::remaining  )  const [inline]
 

Returns:
Remaining bytes to be read from the request

apr_time_t ApacheRequestRec::request_time  )  const [inline]
 

Returns:
Time when the request started

int ApacheRequestRec::rflush  ) 
 

int ApacheRequestRec::rprintf const char *  fmt,
  ...
 

int ApacheRequestRec::rputc int  c  ) 
 

int ApacheRequestRec::rputs const char *  str  )  const
 

int ApacheRequestRec::rwrite const void *  buf,
int  nbyte
 

apr_off_t ApacheRequestRec::sent_bodyct  )  const [inline]
 

Returns:
byte count in stream is for body

ApacheServerRec* ApacheRequestRec::server  )  [inline]
 

Returns:
The server associated with the request

int ApacheRequestRec::some_auth_required  )  [inline]
 

int ApacheRequestRec::status  )  const [inline]
 

Returns:
Status line

const char* ApacheRequestRec::status_line  )  const [inline]
 

Returns:
Time when the request started

apr_table_t* ApacheRequestRec::subprocess_env  )  const [inline]
 

Returns:
An array of environment variables passed to the subprocess

string ApacheRequestRec::table_string const apr_table_t *  pTable  )  const
 

const char* ApacheRequestRec::the_request  )  const [inline]
 

Returns:
the first line of actual http request content

const char* ApacheRequestRec::unparsed_uri  )  const [inline]
 

void ApacheRequestRec::update_mtime apr_time_t  dependency_mtime  )  [inline]
 

const char* ApacheRequestRec::uri  )  const [inline]
 

const char* ApacheRequestRec::user  )  const [inline]
 

const char* ApacheRequestRec::vlist_validator  )  const [inline]
 


Member Data Documentation

ApacheRequestRec* ApacheRequestRec::mMain [private]
 

ApacheRequestRec* ApacheRequestRec::mNext [private]
 

ApacheRequestRec* ApacheRequestRec::mPrev [private]
 

request_rec* ApacheRequestRec::mRequest [private]
 

ApacheServerRec* ApacheRequestRec::mServer [private]
 


The documentation for this class was generated from the following files:
Generated on Sun Apr 3 15:38:42 2005 for mod_cplusplus by  doxygen 1.4.2