You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2023/01/04 14:37:23 UTC
svn commit: r1906393 - in /httpd/httpd/branches/2.4.x: ./ STATUS changes-entries/pr35981.txt modules/dav/main/mod_dav.c
Author: rpluem
Date: Wed Jan 4 14:37:23 2023
New Revision: 1906393
URL: http://svn.apache.org/viewvc?rev=1906393&view=rev
Log:
Merge r1477687 from trunk:
mod_dav: mod_dav overrides dav_fs response on PUT failure. PR 35981.
PR: 35981
Reviewed by: rpluem, covener, jorton, gbechis
Added:
httpd/httpd/branches/2.4.x/changes-entries/pr35981.txt (with props)
Modified:
httpd/httpd/branches/2.4.x/ (props changed)
httpd/httpd/branches/2.4.x/STATUS
httpd/httpd/branches/2.4.x/modules/dav/main/mod_dav.c
Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
Merged /httpd/httpd/trunk:r1477687
Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1906393&r1=1906392&r2=1906393&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Wed Jan 4 14:37:23 2023
@@ -201,13 +201,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
2.4.x patch: svn merge -c 1906051 ^/httpd/httpd/trunk .
+1: icing, covener, gbechis
- *) mod_dav: mod_dav overrides dav_fs response on PUT failure. PR 35981
- Trunk version of patch:
- https://svn.apache.org/r1477687
- Backport version for 2.4.x of patch:
- Trunk version of patch works (only CHANGES conflicts)
- svn merge -c 1477687 ^/httpd/httpd/trunk .
- +1: rpluem, covener, jorton, gbechis
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
Added: httpd/httpd/branches/2.4.x/changes-entries/pr35981.txt
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/changes-entries/pr35981.txt?rev=1906393&view=auto
==============================================================================
--- httpd/httpd/branches/2.4.x/changes-entries/pr35981.txt (added)
+++ httpd/httpd/branches/2.4.x/changes-entries/pr35981.txt Wed Jan 4 14:37:23 2023
@@ -0,0 +1,3 @@
+ *) mod_dav: mod_dav overrides dav_fs response on PUT failure. PR 35981
+ [Basant Kumar Kukreja <basant.kukreja sun.com>, Alejandro Alvarez
+ <alejandro.alvarez.ayllon cern.ch>]
Propchange: httpd/httpd/branches/2.4.x/changes-entries/pr35981.txt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: httpd/httpd/branches/2.4.x/modules/dav/main/mod_dav.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/dav/main/mod_dav.c?rev=1906393&r1=1906392&r2=1906393&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/dav/main/mod_dav.c (original)
+++ httpd/httpd/branches/2.4.x/modules/dav/main/mod_dav.c Wed Jan 4 14:37:23 2023
@@ -1020,12 +1020,17 @@ static int dav_method_put(request_rec *r
/* Create the new file in the repository */
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);
+ int status = err->status ? err->status : HTTP_FORBIDDEN;
+ if (status > 299) {
+ err = dav_push_error(r->pool, status, 0,
+ apr_psprintf(r->pool,
+ "Unable to PUT new contents for %s.",
+ ap_escape_html(r->pool, r->uri)),
+ err);
+ }
+ else {
+ err = NULL;
+ }
}
if (err == NULL && has_range) {