View | Details | Raw Unified | Return to bug 34377
Collapse All | Expand All

(-)/home/rlake/apachesvn/trunk/modules/proxy/mod_proxy.c (+27 lines)
Lines 677-682 Link Here
677
            /* TODO: reclycle direct worker */
677
            /* TODO: reclycle direct worker */
678
        }
678
        }
679
    }
679
    }
680
    if (conf->auth_override && access_status == HTTP_UNAUTHORIZED) {
681
        apr_table_unset(r->err_headers_out, "WWW-Authenticate");
682
        r->status_line = NULL;
683
        return conf->auth_override;
684
    }
680
    return access_status;
685
    return access_status;
681
}
686
}
682
687
Lines 715-720 Link Here
715
    ps->maxfwd_set = 0;
720
    ps->maxfwd_set = 0;
716
    ps->error_override = 0; 
721
    ps->error_override = 0; 
717
    ps->error_override_set = 0; 
722
    ps->error_override_set = 0; 
723
    ps->auth_override = 0; 
724
    ps->auth_override_set = 0; 
718
    ps->preserve_host_set = 0;
725
    ps->preserve_host_set = 0;
719
    ps->preserve_host = 0;    
726
    ps->preserve_host = 0;    
720
    ps->timeout = 0;
727
    ps->timeout = 0;
Lines 756-761 Link Here
756
    ps->io_buffer_size = (overrides->io_buffer_size_set == 0) ? base->io_buffer_size : overrides->io_buffer_size;
763
    ps->io_buffer_size = (overrides->io_buffer_size_set == 0) ? base->io_buffer_size : overrides->io_buffer_size;
757
    ps->maxfwd = (overrides->maxfwd_set == 0) ? base->maxfwd : overrides->maxfwd;
764
    ps->maxfwd = (overrides->maxfwd_set == 0) ? base->maxfwd : overrides->maxfwd;
758
    ps->error_override = (overrides->error_override_set == 0) ? base->error_override : overrides->error_override;
765
    ps->error_override = (overrides->error_override_set == 0) ? base->error_override : overrides->error_override;
766
    ps->auth_override = (overrides->auth_override_set == 0) ? base->auth_override : overrides->auth_override;
759
    ps->preserve_host = (overrides->preserve_host_set == 0) ? base->preserve_host : overrides->preserve_host;
767
    ps->preserve_host = (overrides->preserve_host_set == 0) ? base->preserve_host : overrides->preserve_host;
760
    ps->timeout= (overrides->timeout_set == 0) ? base->timeout : overrides->timeout;
768
    ps->timeout= (overrides->timeout_set == 0) ? base->timeout : overrides->timeout;
761
    ps->badopt = (overrides->badopt_set == 0) ? base->badopt : overrides->badopt;
769
    ps->badopt = (overrides->badopt_set == 0) ? base->badopt : overrides->badopt;
Lines 1150-1155 Link Here
1150
    return NULL;
1158
    return NULL;
1151
}
1159
}
1152
static const char *
1160
static const char *
1161
    set_proxy_auth_override(cmd_parms *parms, void *dummy, const char *arg)
1162
{
1163
    proxy_server_conf *psf =
1164
    ap_get_module_config(parms->server->module_config, &proxy_module);
1165
1166
    if (strcmp(arg, "403") == 0)
1167
       psf->auth_override = 403;
1168
    else if (strcmp(arg, "404") == 0)
1169
       psf->auth_override = 404;
1170
    else if (strcasecmp(arg, "off") == 0)
1171
       psf->auth_override = 0; 
1172
    else
1173
        return "ProxyAuthOverride must be 403, 404 or Off";
1174
    psf->auth_override_set = 1;
1175
    return NULL;
1176
}
1177
static const char *
1153
    set_preserve_host(cmd_parms *parms, void *dummy, int flag)
1178
    set_preserve_host(cmd_parms *parms, void *dummy, int flag)
1154
{
1179
{
1155
    proxy_server_conf *psf =
1180
    proxy_server_conf *psf =
Lines 1557-1562 Link Here
1557
     "Configure Via: proxy header header to one of: on | off | block | full"),
1582
     "Configure Via: proxy header header to one of: on | off | block | full"),
1558
    AP_INIT_FLAG("ProxyErrorOverride", set_proxy_error_override, NULL, RSRC_CONF,
1583
    AP_INIT_FLAG("ProxyErrorOverride", set_proxy_error_override, NULL, RSRC_CONF,
1559
     "use our error handling pages instead of the servers' we are proxying"),
1584
     "use our error handling pages instead of the servers' we are proxying"),
1585
    AP_INIT_TAKE1("ProxyAuthOverride", set_proxy_auth_override, NULL, RSRC_CONF,
1586
     "override authentication requests from the origin server: 403 | 404 | Off"),
1560
    AP_INIT_FLAG("ProxyPreserveHost", set_preserve_host, NULL, RSRC_CONF,
1587
    AP_INIT_FLAG("ProxyPreserveHost", set_preserve_host, NULL, RSRC_CONF,
1561
     "on if we should preserve host header while proxying"),
1588
     "on if we should preserve host header while proxying"),
1562
    AP_INIT_TAKE1("ProxyTimeout", set_proxy_timeout, NULL, RSRC_CONF,
1589
    AP_INIT_TAKE1("ProxyTimeout", set_proxy_timeout, NULL, RSRC_CONF,
(-)/home/rlake/apachesvn/trunk/modules/proxy/mod_proxy.h (+2 lines)
Lines 159-164 Link Here
159
     */
159
     */
160
    int error_override;
160
    int error_override;
161
    int error_override_set;
161
    int error_override_set;
162
    int auth_override;
163
    int auth_override_set;
162
    int preserve_host;
164
    int preserve_host;
163
    int preserve_host_set;
165
    int preserve_host_set;
164
    apr_interval_time_t timeout;
166
    apr_interval_time_t timeout;

Return to bug 34377