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 2005/08/02 21:06:03 UTC
DO NOT REPLY [Bug 35981] New: -
mod_dav overrides dav_fs response on PUT failure
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=35981>.
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=35981
Summary: mod_dav overrides dav_fs response on PUT failure
Product: Apache httpd-2.0
Version: 2.0.54
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: mod_dav
AssignedTo: bugs@httpd.apache.org
ReportedBy: mrinfret@pvnetsolutions.com
mod_dav discards the error status returned from dav_open_stream() during a
failed PUT request. We have modified repos.c to reject certain filename
extensions. Upon receipt of an invalid extension, our dav_fs_open_stream
returns thus:
return dav_new_error(resource->pool, HTTP_UNSUPPORTED_MEDIA_TYPE, 0,
message);
However, dav_method_put (mod_dav.c) overrides this response. (The author even
indicates that this probably isn't the right thing to do.)
if ((err = (*resource->hooks->open_stream)(resource, mode,
&stream)) != NULL) {
/* ### assuming FORBIDDEN is probably not quite right... */
err = dav_push_error(r->pool, HTTP_FORBIDDEN, 0,
apr_psprintf(r->pool,
"Unable to PUT new contents for %s.",
ap_escape_html(r->pool, r->uri)),
err);
}
Thus, we are getting FORBIDDEN at the client when we want
HTTP_UNSUPPORTED_MEDIA_TYPE.
--
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