Skip to content

Commit

Permalink
Fix MKCOL response when we have an EEXIST.
Browse files Browse the repository at this point in the history
Per the WebDAV spec, the correct MKCOL response for when a collection
already exists is 405.

Without this fix, `gfal-mkdir` interprets this as a file-not-found.
  • Loading branch information
bbockelm committed Mar 26, 2020
1 parent 69c44d3 commit 61b9d2b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/XrdHttp/XrdHttpReq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,9 @@ void XrdHttpReq::mapXrdErrorToHttpStatus() {
case kXR_isDirectory:
httpStatusCode = 409; httpStatusText = "Resource is a directory";
break;
case kXR_InvalidRequest:
httpStatusCode = 405; httpStatusText = "Method is not allowed";
break;
default:
break;
}
Expand Down

0 comments on commit 61b9d2b

Please sign in to comment.