You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2003/11/25 15:17:56 UTC
cvs commit: httpd-2.0/modules/dav/main mod_dav.c
jorton 2003/11/25 06:17:56
Modified: modules/dav/main mod_dav.c
Log:
* modules/dav/main/mod_dav.c (dav_method_copymove): For a 401 on the
destination resource, propagate the WWW-Auth header from the
subrequest back to the client.
PR: 15571
Revision Changes Path
1.101 +9 -0 httpd-2.0/modules/dav/main/mod_dav.c
Index: mod_dav.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/dav/main/mod_dav.c,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -u -r1.100 -r1.101
--- mod_dav.c 16 Nov 2003 02:09:13 -0000 1.100
+++ mod_dav.c 25 Nov 2003 14:17:55 -0000 1.101
@@ -2635,6 +2635,15 @@
return dav_error_response(r, lookup.err.status, lookup.err.desc);
}
if (lookup.rnew->status != HTTP_OK) {
+ const char *auth = apr_table_get(lookup.rnew->err_headers_out,
+ "WWW-Authenticate");
+ if (lookup.rnew->status == HTTP_UNAUTHORIZED && auth != NULL) {
+ /* propagate the WWW-Authorization header up from the
+ * subreq so the client sees it. */
+ apr_table_set(r->err_headers_out, "WWW-Authenticate",
+ apr_pstrdup(r->pool, auth));
+ }
+
/* ### how best to report this... */
return dav_error_response(r, lookup.rnew->status,
"Destination URI had an error.");