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

Function set_script

modules/mappers/mod_actions.c:110–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110static const char *set_script(cmd_parms *cmd, void *m_v,
111 const char *method, const char *script)
112{
113 action_dir_config *m = (action_dir_config *)m_v;
114 int methnum;
115 if (cmd->pool == cmd->temp_pool) {
116 /* In .htaccess, we can't globally register new methods. */
117 methnum = ap_method_number_of(method);
118 }
119 else {
120 /* ap_method_register recognizes already registered methods,
121 * so don't bother to check its previous existence explicitly.
122 */
123 methnum = ap_method_register(cmd->pool, method);
124 }
125
126 if (methnum == M_TRACE) {
127 return "TRACE not allowed for Script";
128 }
129 else if (methnum == M_INVALID) {
130 return apr_pstrcat(cmd->pool, "Could not register method '", method,
131 "' for Script", NULL);
132 }
133
134 m->scripted[methnum] = script;
135 m->configured = 1;
136
137 return NULL;
138}
139
140static const command_rec action_cmds[] =
141{

Callers

nothing calls this directly

Calls 2

ap_method_number_ofFunction · 0.85
ap_method_registerFunction · 0.85

Tested by

no test coverage detected