From 3325cebfa97d804f2fd7ace5c2876e3c8e70b332 Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Mon, 13 Nov 2017 05:20:52 -0600 Subject: [PATCH] Allow overwrites to be done on PUT. HTTP PUT is supposed to be idempotent - i.e., it should be done many times. Hence, we should be able to overwrite an existing file; this requires tweaking the existing flags used to open the file. --- src/XrdHttp/XrdHttpReq.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/XrdHttp/XrdHttpReq.cc b/src/XrdHttp/XrdHttpReq.cc index bd08be0fb25..f58c2f4108b 100644 --- a/src/XrdHttp/XrdHttpReq.cc +++ b/src/XrdHttp/XrdHttpReq.cc @@ -1090,7 +1090,7 @@ int XrdHttpReq::ProcessHTTPReq() { l = resourceplusopaque.length() + 1; xrdreq.open.dlen = htonl(l); xrdreq.open.mode = htons(kXR_ur | kXR_uw | kXR_gw | kXR_gr | kXR_or); - xrdreq.open.options = htons(kXR_mkpath | kXR_open_updt | kXR_new); + xrdreq.open.options = htons(kXR_mkpath | kXR_open_wrto ); if (!prot->Bridge->Run((char *) &xrdreq, (char *) resourceplusopaque.c_str(), l)) { prot->SendSimpleResp(404, NULL, NULL, (char *) "Could not run request.", 0);