You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2004/05/17 13:52:10 UTC
DO NOT REPLY [Bug 29034] New: -
MKCOL returns FORBIDDEN instead of CONFLICT when parent collection does not exist
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=29034>.
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=29034
MKCOL returns FORBIDDEN instead of CONFLICT when parent collection does not exist
Summary: MKCOL returns FORBIDDEN instead of CONFLICT when parent
collection does not exist
Product: Apache httpd-2.0
Version: 2.0-HEAD
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: mod_dav
AssignedTo: bugs@httpd.apache.org
ReportedBy: thierry.beigbeder@free.fr
The WebDAV MKCOL method returns FORBIDDEN instead of CONFLICT when the parent
collection or one of its ancestors does not exist.
The issue appears quickly when using the Eclipse IDE release 2.1 with the
FTP/DAV extensions: when uploading a new project with folders/sub-folders on
the target WebDAV site, the Eclipse DAV client checks for CONFLICT status in
order to create parent collections. Here it gets a FORBIDDEN error which is
simply displayed.
I have tested the following workaround with success, but it is probably not
clean, as I just begin to discover Apache's design. In the file mod_dav.c,
function dav_method_mkcol, I have inserted the following lines after success of
dav_auto_checkout:
/* check state for parent */
err = (*resource->hooks->get_parent_resource)(resource,&parent_resource);
if(err == NULL && parent_resource != NULL && !parent_resource->exists) {
return dav_error_response(r, HTTP_CONFLICT,
"Cannot create a collection until one or more intermediate collections
have been created.");
}
With this workaround everything seems to work well and quickly between Eclipse
and Apache.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org