Skip to content

Commit

Permalink
[XrdHttp] Use 405 for mkcol/mkdir EEXIST
Browse files Browse the repository at this point in the history
  • Loading branch information
sfayer committed Apr 5, 2022
1 parent 2c43d2e commit f18e54b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/XrdHttp/XrdHttpReq.cc
Expand Up @@ -2692,8 +2692,12 @@ int XrdHttpReq::PostProcessHTTPReq(bool final_) {
{

if (xrdresp != kXR_ok) {
prot->SendSimpleResp(httpStatusCode, NULL, NULL,
httpStatusText.c_str(), httpStatusText.length(), false);
if (xrderrcode == kXR_ItExists) {
prot->SendSimpleResp(405, NULL, NULL, (char *) "Method is not allowed; resource already exists.", 0, false);
} else {
prot->SendSimpleResp(httpStatusCode, NULL, NULL,
httpStatusText.c_str(), httpStatusText.length(), false);
}
return -1;
}

Expand Down

0 comments on commit f18e54b

Please sign in to comment.