Lines 1394-1406
Link Here
|
1394 |
} |
1394 |
} |
1395 |
|
1395 |
|
1396 |
static const char * |
1396 |
static const char * |
1397 |
set_proxy_error_override(cmd_parms *parms, void *dummy, int flag) |
1397 |
set_proxy_error_override(cmd_parms *parms, void *dummy, const char *arg) |
1398 |
{ |
1398 |
{ |
1399 |
proxy_server_conf *psf = |
1399 |
proxy_server_conf *psf = |
1400 |
ap_get_module_config(parms->server->module_config, &proxy_module); |
1400 |
ap_get_module_config(parms->server->module_config, &proxy_module); |
|
|
1401 |
int min_override; |
1402 |
char *endptr; |
1401 |
|
1403 |
|
1402 |
psf->error_override = flag; |
1404 |
if (strncasecmp(arg, "OFF", 3) == 0) { |
|
|
1405 |
min_override = 0; |
1406 |
} |
1407 |
|
1408 |
else if(strncasecmp(arg, "ON", 2) == 0) { |
1409 |
min_override = 300; |
1410 |
} |
1411 |
|
1412 |
else { |
1413 |
min_override = strtol(arg, &endptr, 10); |
1414 |
if (*endptr != '\0' || !ap_is_HTTP_VALID_RESPONSE(min_override)) { |
1415 |
return "ProxyErrorOverride: argument must be ON, OFF, or an HTTP status code"; |
1416 |
} |
1417 |
} |
1418 |
|
1419 |
psf->error_override = min_override; |
1403 |
psf->error_override_set = 1; |
1420 |
psf->error_override_set = 1; |
|
|
1421 |
|
1404 |
return NULL; |
1422 |
return NULL; |
1405 |
} |
1423 |
} |
1406 |
static const char * |
1424 |
static const char * |
Lines 1892-1899
Link Here
|
1892 |
"A list of ports which CONNECT may connect to"), |
1910 |
"A list of ports which CONNECT may connect to"), |
1893 |
AP_INIT_TAKE1("ProxyVia", set_via_opt, NULL, RSRC_CONF, |
1911 |
AP_INIT_TAKE1("ProxyVia", set_via_opt, NULL, RSRC_CONF, |
1894 |
"Configure Via: proxy header header to one of: on | off | block | full"), |
1912 |
"Configure Via: proxy header header to one of: on | off | block | full"), |
1895 |
AP_INIT_FLAG("ProxyErrorOverride", set_proxy_error_override, NULL, RSRC_CONF, |
1913 |
AP_INIT_TAKE1("ProxyErrorOverride", set_proxy_error_override, NULL, RSRC_CONF, |
1896 |
"use our error handling pages instead of the servers' we are proxying"), |
1914 |
"Use our error handling pages instead of the servers' we are proxying: off | on | minimum-error-code-to-override"), |
1897 |
AP_INIT_FLAG("ProxyPreserveHost", set_preserve_host, NULL, RSRC_CONF, |
1915 |
AP_INIT_FLAG("ProxyPreserveHost", set_preserve_host, NULL, RSRC_CONF, |
1898 |
"on if we should preserve host header while proxying"), |
1916 |
"on if we should preserve host header while proxying"), |
1899 |
AP_INIT_TAKE1("ProxyTimeout", set_proxy_timeout, NULL, RSRC_CONF, |
1917 |
AP_INIT_TAKE1("ProxyTimeout", set_proxy_timeout, NULL, RSRC_CONF, |