[ARVADOS] updated: 1.1.0-175-g65495ab

Git user git at public.curoverse.com
Tue Nov 28 10:18:30 EST 2017


Summary of changes:
 services/keep-web/cadaver_test.go | 11 +++++++++++
 services/keep-web/handler.go      |  4 +++-
 services/keep-web/handler_test.go |  2 +-
 3 files changed, 15 insertions(+), 2 deletions(-)

       via  65495abc7634b2a7cdccd01f7b6b3188b80bf052 (commit)
      from  36d61969535234a6ef7c2ce271c9fe18af2f7cee (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 65495abc7634b2a7cdccd01f7b6b3188b80bf052
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Tue Nov 28 10:17:55 2017 -0500

    12483: Add webdav COPY method.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/services/keep-web/cadaver_test.go b/services/keep-web/cadaver_test.go
index 52d30b0..e80facc 100644
--- a/services/keep-web/cadaver_test.go
+++ b/services/keep-web/cadaver_test.go
@@ -143,6 +143,17 @@ func (s *IntegrationSuite) TestWebdavWithCadaver(c *check.C) {
 		},
 		{
 			path:  writePath,
+			cmd:   "copy newdir2/testfile2 testfile3\n",
+			match: `(?ms).*succeeded.*`,
+		},
+		{
+			path:  writePath,
+			cmd:   "get testfile3 '" + checkfile.Name() + "'\n",
+			match: `(?ms).*succeeded.*`,
+			data:  testdata,
+		},
+		{
+			path:  writePath,
 			cmd:   "get newdir2/testfile2 '" + checkfile.Name() + "'\n",
 			match: `(?ms).*succeeded.*`,
 			data:  testdata,
diff --git a/services/keep-web/handler.go b/services/keep-web/handler.go
index c9148a5..131214d 100644
--- a/services/keep-web/handler.go
+++ b/services/keep-web/handler.go
@@ -139,6 +139,7 @@ func (uos *updateOnSuccess) WriteHeader(code int) {
 
 var (
 	writeMethod = map[string]bool{
+		"COPY":   true,
 		"DELETE": true,
 		"MKCOL":  true,
 		"MOVE":   true,
@@ -146,6 +147,7 @@ var (
 		"RMCOL":  true,
 	}
 	webdavMethod = map[string]bool{
+		"COPY":     true,
 		"DELETE":   true,
 		"MKCOL":    true,
 		"MOVE":     true,
@@ -200,7 +202,7 @@ func (h *handler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) {
 			return
 		}
 		w.Header().Set("Access-Control-Allow-Headers", "Authorization, Content-Type, Range")
-		w.Header().Set("Access-Control-Allow-Methods", "DELETE, GET, MKCOL, MOVE, OPTIONS, POST, PROPFIND, PUT, RMCOL")
+		w.Header().Set("Access-Control-Allow-Methods", "COPY, DELETE, GET, MKCOL, MOVE, OPTIONS, POST, PROPFIND, PUT, RMCOL")
 		w.Header().Set("Access-Control-Allow-Origin", "*")
 		w.Header().Set("Access-Control-Max-Age", "86400")
 		statusCode = http.StatusOK
diff --git a/services/keep-web/handler_test.go b/services/keep-web/handler_test.go
index 85a8e50..21e47c8 100644
--- a/services/keep-web/handler_test.go
+++ b/services/keep-web/handler_test.go
@@ -45,7 +45,7 @@ func (s *UnitSuite) TestCORSPreflight(c *check.C) {
 	c.Check(resp.Code, check.Equals, http.StatusOK)
 	c.Check(resp.Body.String(), check.Equals, "")
 	c.Check(resp.Header().Get("Access-Control-Allow-Origin"), check.Equals, "*")
-	c.Check(resp.Header().Get("Access-Control-Allow-Methods"), check.Equals, "DELETE, GET, MKCOL, MOVE, OPTIONS, POST, PROPFIND, PUT, RMCOL")
+	c.Check(resp.Header().Get("Access-Control-Allow-Methods"), check.Equals, "COPY, DELETE, GET, MKCOL, MOVE, OPTIONS, POST, PROPFIND, PUT, RMCOL")
 	c.Check(resp.Header().Get("Access-Control-Allow-Headers"), check.Equals, "Authorization, Content-Type, Range")
 
 	// Check preflight for a disallowed request

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list