Mod Cplusplus CVS committal
Author : johnksterling
Project : mod_cplusplus
Module : include
Dir : mod_cplusplus/include
Modified Files:
apache_filters.h cpp_request.h
Log Message:
more documentation
===================================================================
RCS file: /cvsroot/modcplusplus/mod_cplusplus/include/apache_filters.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- apache_filters.h 3 Apr 2005 18:58:44 -0000 1.8
+++ apache_filters.h 3 Apr 2005 19:38:24 -0000 1.9
@@ -50,7 +50,7 @@
* \param b the bucket brigade of data
* \param eMode input filtering node (e.g. AP_MODE_GETLINE)
* \param eBlock tells the filter wether or not it should block
- * \param readbytes if the eMode is AP_MODE_READBYTESÊthis tells the module how many bytes
+ * \param readbytes if the eMode is AP_MODE_READBYTES this tells the module how many bytes
**/
virtual apr_status_t request_input_filter(ap_filter_t *f,
===================================================================
RCS file: /cvsroot/modcplusplus/mod_cplusplus/include/cpp_request.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- cpp_request.h 27 Aug 2004 13:19:36 -0000 1.12
+++ cpp_request.h 3 Apr 2005 19:38:24 -0000 1.13
@@ -33,64 +33,160 @@
/** utility functions for formatting **/
string istring(int value, const char* format = "%d") const;
string mstring(const char *cp) const;
+
public:
ApacheRequestRec(request_rec *r, ApacheRequestRec *pPrev = NULL,
ApacheRequestRec *pNext = NULL);
~ApacheRequestRec();
+ /** \return The pool associated with the request **/
apr_pool_t *pool() { return mRequest->pool; }
+ /** \return The connection associated with the request **/
conn_rec *connection() { return mRequest->connection; }
+ /** \return The server associated with the request **/
ApacheServerRec *server() { return mServer; }
+
+ /** \return Pointer to the redirected request if this is an external redirect **/
ApacheRequestRec *next() { return mNext; }
+
+ /** \return Pointer to the previous request if this is an internal redirect **/
ApacheRequestRec *prev() { return mPrev; }
+
+ /** \return Pointer to the main request if this is a sub-request **/
ApacheRequestRec *main() { return mMain; }
+
+ /** \return the first line of actual http request content **/
const char *the_request() const { return mRequest->the_request; }
+
+ /** \return HTTP/0.9, "simple" request (e.g. GET /foo w/no headers) **/
int assbackwards() const { return mRequest->assbackwards; }
+
+ /** \return A proxy request (calculated during post_read_request/translate_name) possible values PROXYREQ_NONE, PROXYREQ_PROXY, PROXYREQ_REVERSE, PROXYREQ_RESPONSE **/
int proxyreq() const { return mRequest->proxyreq; }
+
+ /** \return HEAD request, as opposed to GET **/
int header_only() const { return mRequest->header_only; }
+
+ /** \return Protocol string, as given to us, or HTTP/0.9 **/
const char *protocol() const {return mRequest->protocol; }
+
+ /** \return Protocol version number of protocol; 1.1 = 1001 **/
int proto_num() const { return mRequest->proto_num; }
+
+ /** \return Host, as set by full URI or Host: **/
const char *hostname() const { return mRequest->hostname; }
+
+ /** \return Time when the request started **/
apr_time_t request_time() const { return mRequest->request_time; }
+
+ /** \return Time when the request started **/
const char *status_line() const { return mRequest->status_line; }
+
+ /** \return Status line **/
int status() const {return mRequest->status; }
+
+ /** \return Request method (eg. GET, HEAD, POST, etc.) **/
const char *method() const { return mRequest->method; }
+
+ /** \return M_GET, M_POST, etc. **/
int method_number() const { return mRequest->method_number; }
+
+ /**
+ * \brief '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.
+ *
+ * \return A bit vector of allowed methods
+ **/
apr_int64_t allowed() const { return mRequest->allowed; }
+
+ /** \return Array of extension methods **/
const apr_array_header_t *allowed_xmethods() const {return mRequest->allowed_xmethods; }
+
+ /** \return List of allowed methods **/
const ap_method_list_t *allowed_methods() const {return mRequest->allowed_methods; }
+
+ /** \return byte count in stream is for body **/
apr_off_t sent_bodyct() const {return mRequest->sent_bodyct; }
+
+ /** \return byte count of the body **/
apr_off_t bytes_sent() const { return mRequest->bytes_sent; }
+
+ /** \return Last modified time of the requested resource **/
apr_time_t mtime() const { return mRequest->mtime; }
+
+ /** \return sending chunked transfer-coding **/
int chunked() const { return mRequest->chunked; }
+
+ /** \return The HTTP range header value **/
const char *range() const {return mRequest->range; }
+
+ /** \return The so-called 'real' content length **/
apr_off_t clength() const {return mRequest->clength; }
+
+ /** \return Remaining bytes to be read from the request **/
apr_off_t remaining() const {return mRequest->remaining; }
+
+ /** \return Number of bytes already read from the request **/
apr_off_t read_length() const { return mRequest->read_length; }
+
+ /** \return Method for reading the request body (e.g. REQUEST_CHUNKED_ERROR) **/
int read_body() const { return mRequest->read_body; }
+
+ /** \return Reading chunked encoding **/
int read_chunked() const { return mRequest->read_chunked; }
+ /** \return MIME headers from the request **/
apr_table_t *headers_in() const { return mRequest->headers_in; }
+
+ /** \return MIME headers from the response **/
apr_table_t *headers_out() const { return mRequest->headers_out; }
+
+ /** \return MIME headers from the response printed even on error **/
apr_table_t *err_headers_out() const { return mRequest->err_headers_out; }
+
+ /** \return An array of environment variables passed to the subprocess **/
apr_table_t *subprocess_env() const { return mRequest->subprocess_env; }
+
+ /** \return Notes to pass from one module to another **/
apr_table_t *notes() const { return mRequest->notes; }
+ /** \return The content type of the request **/
const char *content_type(char *type = NULL) const
{ return type ? (mRequest->content_type =
apr_pstrdup(mRequest->pool, type)) :
mRequest->content_type; }
+
+ /** \return the name of the handler assigned this request **/
const char *handler() { return mRequest->handler; }
+
+ /** \return How to encode the data **/
const char *content_encoding() { return mRequest->content_encoding; }
+
+ /** \return Whether the request body will be discarded **/
int discard_request_body() {
return ap_discard_request_body(mRequest);
}
+ /** \return Send blocking data to the client **/
int get_client_block(char *buf, apr_size_t bufsiz) {
return ap_get_client_block(mRequest, buf, bufsiz);
}
+ /** \return Array of strings representing content languages **/
const apr_array_header_t *content_languages() const
{ return mRequest->content_languages; }
|