]> granicus.if.org Git - apache/commitdiff
Forward port of mod_actions' ability to handle arbitrary methods
authorAndre Malo <nd@apache.org>
Fri, 14 Feb 2003 00:43:52 +0000 (00:43 +0000)
committerAndre Malo <nd@apache.org>
Fri, 14 Feb 2003 00:43:52 +0000 (00:43 +0000)
with the Script directive.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98646 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/mappers/mod_actions.c

diff --git a/CHANGES b/CHANGES
index f99aae416747b4bd15162e8d082e51a2b1c78576..aa4e6c2af30f17c558d9aa2846e68ae522103299 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) Forward port of mod_actions' ability to handle arbitrary methods
+     with the Script directive.  [AndrĂ© Malo]
+
   *) mod_auth_digest no longer tries to guess AuthDigestDomain, if it's
      not specified. Now it assumes "/" as already documented. PR 16937.
      [AndrĂ© Malo]
index 1f95fa68f008ea832b06d54cffbbf21cb4751aaa..578792b70072abc54b029b8f3fe66baa63b785a8 100644 (file)
@@ -142,17 +142,23 @@ static const char *set_script(cmd_parms *cmd, void *m_v,
                               const char *method, const char *script)
 {
     action_dir_config *m = (action_dir_config *)m_v;    
-    int methnum;
+    
+    /* ap_method_register recognizes already registered methods,
+     * so don't bother to check its previous existence explicitely.
+     */
+    int methnum = ap_method_register(cmd->pool, method);
 
-    methnum = ap_method_number_of(method);
-    if (methnum == M_TRACE)
+    if (methnum == M_TRACE) {
         return "TRACE not allowed for Script";
-    else if (methnum == M_INVALID)
-        return "Unknown method type for Script";
-    else
-        m->scripted[methnum] = script;
+    }
+    else if (methnum == M_INVALID) {
+        return apr_pstrcat(cmd->pool, "Could not register method '", method,
+                           "' for Script", NULL);
+    }
 
+    m->scripted[methnum] = script;
     m->configured = 1;
+
     return NULL;
 }