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: [email protected] ReportedBy: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
