ASF Bugzilla – Attachment 22817 Details for
Bug 38330
Cannot RemoveType which comes from mime.types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to make RemoveType override the info from TypesConfig
38330.patch (text/plain), 1.45 KB, created by
Stefan Fritsch
on 2008-10-31 16:44:50 UTC
(
hide
)
Description:
patch to make RemoveType override the info from TypesConfig
Filename:
MIME Type:
Creator:
Stefan Fritsch
Created:
2008-10-31 16:44:50 UTC
Size:
1.45 KB
patch
obsolete
>--- mod_mime.c.orig 2008-11-01 00:24:05.000000000 +0100 >+++ mod_mime.c 2008-11-01 00:32:38.000000000 +0100 >@@ -274,6 +274,16 @@ > } > > /* >+ * As RemoveType should also override the info from TypesConfig, we add an >+ * empty string as type instead of actually removing the type. >+ */ >+static const char *remove_extension_type(cmd_parms *cmd, void *m_, >+ const char *ext) >+{ >+ return add_extension_info(cmd, m_, "", ext); >+} >+ >+/* > * Note handler names are un-added with each per_dir_config merge. > * This keeps the association from being inherited, but not > * from being re-added at a subordinate level. >@@ -397,7 +407,7 @@ > AP_INIT_ITERATE("RemoveOutputFilter", remove_extension_info, > (void *)APR_OFFSETOF(extension_info, output_filters), OR_FILEINFO, > "one or more file extensions"), >- AP_INIT_ITERATE("RemoveType", remove_extension_info, >+ AP_INIT_ITERATE("RemoveType", remove_extension_type, > (void *)APR_OFFSETOF(extension_info, forced_type), OR_FILEINFO, > "one or more file extensions"), > AP_INIT_TAKE1("TypesConfig", set_types_config, NULL, RSRC_CONF, >@@ -809,7 +819,8 @@ > > if (exinfo != NULL) { > >- if (exinfo->forced_type) { >+ /* empty string is treated as special case for RemoveType */ >+ if (exinfo->forced_type && *exinfo->forced_type) { > ap_set_content_type(r, exinfo->forced_type); > found = 1; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 38330
: 22817