mturk 2004/07/30 03:20:00 Modified: ajp/ajplib/test httpd_wrap.h httpd_wrap.c Log: Added ap_set_content_type. Revision Changes Path 1.8 +24 -0 jakarta-tomcat-connectors/ajp/ajplib/test/httpd_wrap.h Index: httpd_wrap.h =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/httpd_wrap.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- httpd_wrap.h 30 Jul 2004 08:26:37 -0000 1.7 +++ httpd_wrap.h 30 Jul 2004 10:20:00 -0000 1.8 @@ -250,6 +250,20 @@ /** Minor part of HTTP protocol */ #define HTTP_VERSION_MINOR(number) ((number)%1000) +/** + * @defgroup values_request_rec_body Possible values for request_rec.read_body + * @{ + * Possible values for request_rec.read_body (set by handling module): + */ + +/** Send 413 error if message has any body */ +#define REQUEST_NO_BODY 0 +/** Send 411 error if body without Content-Length */ +#define REQUEST_CHUNKED_ERROR 1 +/** If chunked, remove the chunks for me. */ +#define REQUEST_CHUNKED_DECHUNK 2 +/** @} */ + /* fake structure declarations */ typedef struct process_rec process_rec; @@ -679,6 +693,16 @@ * @deffunc int ap_discard_request_body(request_rec *r) */ AP_DECLARE(int) ap_discard_request_body(request_rec *r); + +/** + * Set the content type for this request (r->content_type). + * @param r The current request + * @param ct The new content type + * @deffunc void ap_set_content_type(request_rec *r, const char* ct) + * @warning This function must be called to set r->content_type in order + * for the AddOutputFilterByType directive to work correctly. + */ +AP_DECLARE(void) ap_set_content_type(request_rec *r, const char *ct); /** * create the request_rec structure from fake client connection 1.11 +6 -0 jakarta-tomcat-connectors/ajp/ajplib/test/httpd_wrap.c Index: httpd_wrap.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/httpd_wrap.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- httpd_wrap.c 30 Jul 2004 09:44:15 -0000 1.10 +++ httpd_wrap.c 30 Jul 2004 10:20:00 -0000 1.11 @@ -318,6 +318,12 @@ return r->server->server_hostname; } +AP_DECLARE(void) ap_set_content_type(request_rec *r, const char *ct) +{ + r->content_type = ct; +} + + #define UNKNOWN_METHOD (-1) static int lookup_builtin_method(const char *method, apr_size_t len)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]