Commit 358a2e37 authored by Andre Malo's avatar Andre Malo
Browse files

Satisfy directives now can be influenced by a surrounding <Limit>

container.

PR: 14726.
Reviewed by: Jeff Trawick, Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@104841 13f79535-47bb-0310-9956-ffa450edef68
parent 0e96d0c0
Loading
Loading
Loading
Loading
+3 −0
Changes for CHANGES: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
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 −7
Changes for STATUS: 1 added line, 7 removed lines.
Original line number Diff line number Diff line
APACHE 2.0 STATUS:                                              -*-text-*-
Last modified at [$Date: 2004/08/26 21:53:23 $]
Last modified at [$Date: 2004/08/26 22:16:52 $]

Release:

@@ -198,12 +198,6 @@ PATCHES TO BACKPORT FROM 2.1
                      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/
+1 −1
Changes for include/http_core.h: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -422,7 +422,7 @@ typedef struct {
  
    /* 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;
+20 −6
Changes for server/core.c: 20 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ static char errordocument_default;
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 @@ static void *create_core_dir_config(apr_pool_t *a, char *dir)

    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 @@ static void *merge_core_dir_configs(apr_pool_t *a, void *basev, void *newv)
    /* 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 @@ AP_DECLARE(int) ap_satisfies(request_rec *r)
    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,17 +1522,25 @@ static const char *set_enable_sendfile(cmd_parms *cmd, void *d_,
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;
}