MCPcopy Create free account
hub / github.com/apache/httpd / remove_extension_info

Function remove_extension_info

modules/http/mod_mime.c:291–307  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

289 * from being re-added at a subordinate level.
290 */
291static const char *remove_extension_info(cmd_parms *cmd, void *m_,
292 const char *ext)
293{
294 mime_dir_config *m = (mime_dir_config *) m_;
295 attrib_info *suffix;
296 if (*ext == '.') {
297 ++ext;
298 }
299 if (!m->remove_mappings) {
300 m->remove_mappings = apr_array_make(cmd->pool, 4, sizeof(*suffix));
301 }
302 suffix = (attrib_info *)apr_array_push(m->remove_mappings);
303 suffix->name = apr_pstrdup(cmd->pool, ext);
304 ap_str_tolower(suffix->name);
305 suffix->offset = (int) (long) cmd->info;
306 return NULL;
307}
308
309/* The sole bit of server configuration that the MIME module has is
310 * the name of its config file, so...

Callers

nothing calls this directly

Calls 1

ap_str_tolowerFunction · 0.85

Tested by

no test coverage detected