httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/mappers mod_actions.c
Date Fri, 14 Feb 2003 00:43:52 GMT
nd          2003/02/13 16:43:52

  Modified:    .        CHANGES
               modules/mappers mod_actions.c
  Log:
  Forward port of mod_actions' ability to handle arbitrary methods
  with the Script directive.
  
  Revision  Changes    Path
  1.1063    +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1062
  retrieving revision 1.1063
  diff -u -r1.1062 -r1.1063
  --- CHANGES	13 Feb 2003 02:28:57 -0000	1.1062
  +++ CHANGES	14 Feb 2003 00:43:51 -0000	1.1063
  @@ -2,6 +2,9 @@
   
     [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]
  
  
  
  1.31      +13 -7     httpd-2.0/modules/mappers/mod_actions.c
  
  Index: mod_actions.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_actions.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- mod_actions.c	13 Feb 2003 21:21:15 -0000	1.30
  +++ mod_actions.c	14 Feb 2003 00:43:52 -0000	1.31
  @@ -142,17 +142,23 @@
                                 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;
   }
   
  
  
  

Mime
View raw message