mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Follow up to r1879080: replace ProxyUseOriginalURI by mapping=encoded.
Instead of having a separate ProxyUseOriginalURI directive to control pre_ vs normal translate stage, let's handle this at each ProxyPass level, with the mapping= parameter. At pre_translate stage mod_proxy will handle the "encoded" mapping only, and at translate stage only the others (unless a worker was already elected at the first stage). Note that since mapping=servlet needs to happen encoded too, it's defined like: #define PROXYPASS_MAP_ENCODED 0x08 #define PROXYPASS_MAP_SERVLET 0x18 /* + MAP_ENCODED */ so uch that proxy_trans does the right thing. Follow up to r1879080: replace ProxyUseOriginalURI by mapping=encoded. Instead of having a separate ProxyUseOriginalURI directive to control pre_ vs normal translate stage, let's handle this at each ProxyPass level, with the mapping= parameter. At pre_translate stage mod_proxy will handle the "encoded" mapping only, and at translate stage only the others (unless a worker was already elected at the first stage). Note that since mapping=servlet needs to happen encoded too, it's defined like: #define PROXYPASS_MAP_ENCODED 0x08 #define PROXYPASS_MAP_SERVLET 0x18 /* + MAP_ENCODED */ so that proxy_trans does the right thing. This allows for simpler and consistent mapping configuration, where the translate stage depends only on the mapping= parameter. To implement a fast path (do nothing) when no encoded mapping is configured at pre_trans stage, or all mappings are encoded at translate stage, two bits are added to proxy_server_conf (map_encoded_one:1, map_encoded_all:1) and updated at load time. Thus MINOR is bumped too. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879145 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -123,7 +123,8 @@ struct proxy_remote {
|
||||
#define PROXYPASS_NOCANON 0x01
|
||||
#define PROXYPASS_INTERPOLATE 0x02
|
||||
#define PROXYPASS_NOQUERY 0x04
|
||||
#define PROXYPASS_MAPPING_SERVLET 0x08
|
||||
#define PROXYPASS_MAP_ENCODED 0x08
|
||||
#define PROXYPASS_MAP_SERVLET 0x18 /* + MAP_ENCODED */
|
||||
struct proxy_alias {
|
||||
const char *real;
|
||||
const char *fake;
|
||||
@@ -200,6 +201,8 @@ typedef struct {
|
||||
unsigned int inherit_set:1;
|
||||
unsigned int ppinherit:1;
|
||||
unsigned int ppinherit_set:1;
|
||||
unsigned int map_encoded_one:1;
|
||||
unsigned int map_encoded_all:1;
|
||||
} proxy_server_conf;
|
||||
|
||||
typedef struct {
|
||||
@@ -244,9 +247,6 @@ typedef struct {
|
||||
unsigned int forward_100_continue_set:1;
|
||||
|
||||
apr_array_header_t *error_override_codes;
|
||||
|
||||
/** Whether to use original/encoded URI-path or not (default) */
|
||||
signed char use_original_uri;
|
||||
} proxy_dir_conf;
|
||||
|
||||
/* if we interpolate env vars per-request, we'll need a per-request
|
||||
|
Reference in New Issue
Block a user