]>
Commit | Line | Data |
---|---|---|
0e467b1f AM |
1 | --- httpd-2.0.46/modules/dav/main/mod_dav.c.dav401dest |
2 | +++ httpd-2.0.46/modules/dav/main/mod_dav.c | |
3 | @@ -2618,6 +2618,15 @@ | |
4 | return dav_error_response(r, lookup.err.status, lookup.err.desc); | |
5 | } | |
6 | if (lookup.rnew->status != HTTP_OK) { | |
7 | + const char *auth = apr_table_get(lookup.rnew->err_headers_out, | |
8 | + "WWW-Authenticate"); | |
9 | + if (lookup.rnew->status == HTTP_UNAUTHORIZED && auth != NULL) { | |
10 | + /* propagate the WWW-Authorization header up from the | |
11 | + * subreq so the client sees it. */ | |
12 | + apr_table_set(r->err_headers_out, "WWW-Authenticate", | |
13 | + apr_pstrdup(r->pool, auth)); | |
14 | + } | |
15 | + | |
16 | /* ### how best to report this... */ | |
17 | return dav_error_response(r, lookup.rnew->status, | |
18 | "Destination URI had an error."); |