- switch (err->http_status) {
- case HTTP_PROXY_AUTHENTICATION_REQUIRED:
- /* Proxy authorisation needed */
- httpHeaderPutStrf(&rep->header, HDR_PROXY_AUTHENTICATE,
- proxy_auth_challenge_fmt, Config.proxyAuthRealm);
- break;
- case HTTP_UNAUTHORIZED:
- /* WWW Authorisation needed */
- httpHeaderPutStrf(&rep->header, HDR_WWW_AUTHENTICATE,
- proxy_auth_challenge_fmt, Config.proxyAuthRealm);
- break;
- default:
- /* Keep GCC happy */
- break;
- }
+ /* TODO: alter errorstate to be accel on|off aware. The 0 on the next line
+ * depends on authenticate behaviour: all schemes to date send no extra data
+ * on 407/401 responses, and do not check the accel state on 401/407 responses
+ */
+ authenticateFixHeader(rep, err->auth_user_request, err->request, 0);