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:
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/
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));
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;
/* 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) {
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
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;
}