From: Bill Stoddard Date: Wed, 20 Mar 2002 17:44:13 +0000 (+0000) Subject: Commit 2 of 2 to: X-Git-Tag: 2.0.34~210 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76bef9981fcb97a20bb07aa0cd121363b420ac38;p=thirdparty%2Fapache%2Fhttpd.git Commit 2 of 2 to: 1. rename ap_rset_content_type to ap_set_content_type 2. reverse the arguments to aligh with ap_set_content_length git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94057 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/http_protocol.h b/include/http_protocol.h index 5e85b11155d..87f823830d8 100644 --- a/include/http_protocol.h +++ b/include/http_protocol.h @@ -321,9 +321,15 @@ AP_DECLARE(void) ap_method_list_remove(ap_method_list_t *l, AP_DECLARE(void) ap_clear_method_list(ap_method_list_t *l); /** - * + * Set the content type for this request (r->content_type). + * Note: + * This function must be called to set r->content_type in order + * for the AddOutputFilterByType directive to work correctly. + * @param r The current request + * @param length The new content type + * @deffunc void ap_set_content_type(request_rec *r, const char* ct) */ -AP_DECLARE(void) ap_rset_content_type(const char *str, request_rec *r); +AP_DECLARE(void) ap_set_content_type(request_rec *r, const char *ct); /* Hmmm... could macrofy these for now, and maybe forever, though the * definitions of the macros would get a whole lot hairier. diff --git a/server/core.c b/server/core.c index 37be31056d8..18f54c0db4b 100644 --- a/server/core.c +++ b/server/core.c @@ -3095,7 +3095,7 @@ static int core_override_type(request_rec *r) /* Check for overrides with ForceType / SetHandler */ if (conf->mime_type && strcmp(conf->mime_type, "none")) - ap_rset_content_type((char*) conf->mime_type, r); + ap_set_content_type(r, (char*) conf->mime_type); if (conf->handler && strcmp(conf->handler, "none")) r->handler = conf->handler; diff --git a/server/util_script.c b/server/util_script.c index 36ad107c345..351b08b5a2b 100644 --- a/server/util_script.c +++ b/server/util_script.c @@ -569,7 +569,7 @@ AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, tmp = apr_pstrdup(r->pool, l); ap_content_type_tolower(tmp); - ap_rset_content_type(tmp, r); + ap_set_content_type(r, tmp); } /* * If the script returned a specific status, that's what