From: Bill Stoddard Date: Wed, 20 Mar 2002 17:44:13 +0000 (+0000) Subject: Commit 2 of 2 to: X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=043dc587322e26dc598d2e864a5ba907ea0317b7;p=apache 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 5e85b11155..87f823830d 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 37be31056d..18f54c0db4 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 36ad107c34..351b08b5a2 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