1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

mod_proxy: follow up to r1836588: configurable Proxy100Continue.

Add Proxy100Continue directive to allow for 100-continue forwarding opt-out.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1856036 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yann Ylavic
2019-03-22 09:53:29 +00:00
parent 67ef6b9417
commit 0848891b92
5 changed files with 50 additions and 2 deletions

View File

@@ -1579,6 +1579,8 @@ static void *create_proxy_dir_config(apr_pool_t *p, char *dummy)
new->error_override_set = 0;
new->add_forwarded_headers = 1;
new->add_forwarded_headers_set = 0;
new->forward_100_continue = 1;
new->forward_100_continue_set = 0;
return (void *) new;
}
@@ -1615,6 +1617,11 @@ static void *merge_proxy_dir_config(apr_pool_t *p, void *basev, void *addv)
: add->add_forwarded_headers;
new->add_forwarded_headers_set = add->add_forwarded_headers_set
|| base->add_forwarded_headers_set;
new->forward_100_continue =
(add->forward_100_continue_set == 0) ? base->forward_100_continue
: add->forward_100_continue;
new->forward_100_continue_set = add->forward_100_continue_set
|| base->forward_100_continue_set;
return new;
}
@@ -2130,6 +2137,14 @@ static const char *
conf->preserve_host_set = 1;
return NULL;
}
static const char *
forward_100_continue(cmd_parms *parms, void *dconf, int flag)
{
proxy_dir_conf *conf = dconf;
conf->forward_100_continue = flag;
conf->forward_100_continue_set = 1;
return NULL;
}
static const char *
set_recv_buffer_size(cmd_parms *parms, void *dummy, const char *arg)
@@ -2717,6 +2732,9 @@ static const command_rec proxy_cmds[] =
"Configure local source IP used for request forward"),
AP_INIT_FLAG("ProxyAddHeaders", add_proxy_http_headers, NULL, RSRC_CONF|ACCESS_CONF,
"on if X-Forwarded-* headers should be added or completed"),
AP_INIT_FLAG("Proxy100Continue", forward_100_continue, NULL, RSRC_CONF|ACCESS_CONF,
"on if 100-Continue should be forwarded to the origin server, off if the "
"proxy should handle it by itself"),
{NULL}
};