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/server core.c
Date Thu, 26 Aug 2004 22:16:54 GMT
nd          2004/08/26 15:16:54

  Modified:    .        Tag: APACHE_2_0_BRANCH CHANGES STATUS
               include  Tag: APACHE_2_0_BRANCH http_core.h
               server   Tag: APACHE_2_0_BRANCH core.c
  Log:
  Satisfy directives now can be influenced by a surrounding <Limit>
  container.
  
  PR: 14726.
  Reviewed by: Jeff Trawick, Bill Stoddard
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.988.2.337 +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.988.2.336
  retrieving revision 1.988.2.337
  diff -u -u -r1.988.2.336 -r1.988.2.337
  --- CHANGES	26 Aug 2004 21:53:22 -0000	1.988.2.336
  +++ CHANGES	26 Aug 2004 22:16:52 -0000	1.988.2.337
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0.51
   
  +  *) Satisfy directives now can be influenced by a surrounding <Limit>
  +     container.  PR 14726.  [André Malo]
  +
     *) mod_rewrite now officially supports RewriteRules in <Proxy> sections.
        PR 27985.  [André Malo]
   
  
  
  
  1.751.2.1022 +1 -7      httpd-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/STATUS,v
  retrieving revision 1.751.2.1021
  retrieving revision 1.751.2.1022
  diff -u -u -r1.751.2.1021 -r1.751.2.1022
  --- STATUS	26 Aug 2004 21:53:23 -0000	1.751.2.1021
  +++ STATUS	26 Aug 2004 22:16:52 -0000	1.751.2.1022
  @@ -198,12 +198,6 @@
                         a correctness fix; just a perf. fix.  We'd send the EOS
                         later without it.
   
  -    *) Allow Satisfy directives to be influenced by <Limit>.
  -       PR: 14726
  -         include/http_core.h: r1.81
  -         server/core.c: r1.266
  -       +1: nd, trawick, stoddard
  -
       *) Provide TLS/SSL upgrade functionality in mod_ssl allowing an unsecure
          connection to be upgraded to a secure connection upon request by the
          client.  The full patch file is available at http://www.apache.org/~bnicholes/
  
  
  
  No                   revision
  No                   revision
  1.70.2.8  +1 -1      httpd-2.0/include/http_core.h
  
  Index: http_core.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/http_core.h,v
  retrieving revision 1.70.2.7
  retrieving revision 1.70.2.8
  diff -u -u -r1.70.2.7 -r1.70.2.8
  --- http_core.h	25 Mar 2004 02:07:28 -0000	1.70.2.7
  +++ http_core.h	26 Aug 2004 22:16:53 -0000	1.70.2.8
  @@ -422,7 +422,7 @@
     
       /* Authentication stuff.  Groan... */
       
  -    int satisfy;
  +    int *satisfy; /* for every method one */
       char *ap_auth_type;
       char *ap_auth_name;
       apr_array_header_t *ap_requires;
  
  
  
  No                   revision
  No                   revision
  1.225.2.26 +20 -6     httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.225.2.25
  retrieving revision 1.225.2.26
  diff -u -u -r1.225.2.25 -r1.225.2.26
  --- core.c	15 Aug 2004 22:42:14 -0000	1.225.2.25
  +++ core.c	26 Aug 2004 22:16:53 -0000	1.225.2.26
  @@ -98,6 +98,7 @@
   static void *create_core_dir_config(apr_pool_t *a, char *dir)
   {
       core_dir_config *conf;
  +    int i;
   
       conf = (core_dir_config *)apr_pcalloc(a, sizeof(core_dir_config));
   
  @@ -114,7 +115,10 @@
   
       conf->hostname_lookups = HOSTNAME_LOOKUP_UNSET;
       conf->do_rfc1413 = DEFAULT_RFC1413 | 2; /* set bit 1 to indicate default */
  -    conf->satisfy = SATISFY_NOSPEC;
  +    conf->satisfy = apr_palloc(a, sizeof(*conf->satisfy) * METHODS);
  +    for (i = 0; i < METHODS; ++i) {
  +        conf->satisfy[i] = SATISFY_NOSPEC;
  +    }
   
   #ifdef RLIMIT_CPU
       conf->limit_cpu = NULL;
  @@ -347,8 +351,10 @@
       /* Otherwise we simply use the base->sec_file array
        */
   
  -    if (new->satisfy != SATISFY_NOSPEC) {
  -        conf->satisfy = new->satisfy;
  +    for (i = 0; i < METHODS; ++i) {
  +        if (new->satisfy[i] != SATISFY_NOSPEC) {
  +            conf->satisfy[i] = new->satisfy[i];
  +        }
       }
   
       if (new->server_signature != srv_sig_unset) {
  @@ -680,7 +686,7 @@
       conf = (core_dir_config *)ap_get_module_config(r->per_dir_config,
                                                      &core_module);
   
  -    return conf->satisfy;
  +    return conf->satisfy[r->method_number];
   }
   
   /* Should probably just get rid of this... the only code that cares is
  @@ -1516,15 +1522,23 @@
   static const char *satisfy(cmd_parms *cmd, void *c_, const char *arg)
   {
       core_dir_config *c = c_;
  +    int satisfy = SATISFY_NOSPEC;
  +    int i;
   
       if (!strcasecmp(arg, "all")) {
  -        c->satisfy = SATISFY_ALL;
  +        satisfy = SATISFY_ALL;
       }
       else if (!strcasecmp(arg, "any")) {
  -        c->satisfy = SATISFY_ANY;
  +        satisfy = SATISFY_ANY;
       }
       else {
           return "Satisfy either 'any' or 'all'.";
  +    }
  +
  +    for (i = 0; i < METHODS; ++i) {
  +        if (cmd->limited & (AP_METHOD_BIT << i)) {
  +            c->satisfy[i] = satisfy;
  +        }
       }
   
       return NULL;
  
  
  

Mime
View raw message