httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 39299] - Internal Server Error (500) on COPY
Date Wed, 07 Mar 2007 00:51:47 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39299>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39299





------- Additional Comments From basant.kukreja@sun.com  2007-03-06 16:51 -------
(From update of attachment 19673)
Index: modules/dav/fs/repos.c
===================================================================
--- modules/dav/fs/repos.c	(revision 500367)
+++ modules/dav/fs/repos.c	(working copy)
@@ -348,8 +348,19 @@
     status = apr_file_open(&outf, dst, APR_WRITE | APR_CREATE | APR_TRUNCATE
			    | APR_BINARY, perms, p);
     if (status != APR_SUCCESS) {
+	 char *dirpath = NULL;
+	 apr_finfo_t dir_finfo;
+	 apr_status_t rv;
	 apr_file_close(inf);

+	 /* check if destination directory exists if not then return
+	  * HTTP_CONFLICT
+	  */
+	 dirpath = ap_make_dirstr_parent(p, dst);
+	 rv = apr_stat(&dir_finfo, dirpath, APR_FINFO_NORM, p);
+	 if (rv != APR_SUCCESS)
+	     return dav_new_error(p, HTTP_CONFLICT, 0, dirpath);
+
	 return dav_new_error(p, MAP_IO2HTTP(status), 0,
			      "Could not open file for writing");
     }
Index: modules/dav/main/mod_dav.c
===================================================================
--- modules/dav/main/mod_dav.c	(revision 500367)
+++ modules/dav/main/mod_dav.c	(working copy)
@@ -2637,6 +2637,10 @@
	 return dav_error_response(r, lookup.rnew->status,
				   "Destination URI had an error.");
     }
+    if (!dav_get_provider(lookup.rnew)) {
+	 return dav_error_response(r, HTTP_FORBIDDEN,
+				   "Destination URI had an error.");
+    }

     /* Resolve destination resource */
     err = dav_get_resource(lookup.rnew, 0 /* label_allowed */,


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message