[ARVADOS] updated: 1.2.0-306-gf90b933c5

Git user git at public.curoverse.com
Tue Nov 6 09:19:47 EST 2018


Summary of changes:
 services/keep-web/cadaver_test.go | 15 +++++++++++++++
 services/keep-web/handler.go      |  8 ++++++++
 2 files changed, 23 insertions(+)

       via  f90b933c50d1b7807a474e1a909ea07217a42fe6 (commit)
       via  faf5eff7c8f964262dd4ae2e470a287e1f4321d5 (commit)
      from  1ae309b0d7449dd9fed18ffe6187279235d852c8 (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 f90b933c50d1b7807a474e1a909ea07217a42fe6
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Thu Oct 18 10:35:13 2018 -0400

    14345: Log User-Agent header.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/services/keep-web/handler.go b/services/keep-web/handler.go
index 6aeb7b9c4..11999c349 100644
--- a/services/keep-web/handler.go
+++ b/services/keep-web/handler.go
@@ -322,6 +322,10 @@ func (h *handler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) {
 		return
 	}
 
+	if r.Method == "LOCK" {
+		log.Printf("LOCK request, User-Agent: %s", r.Header.Get("User-Agent"))
+	}
+
 	if useSiteFS {
 		if tokens == nil {
 			tokens = auth.CredentialsFromRequest(r).Tokens

commit faf5eff7c8f964262dd4ae2e470a287e1f4321d5
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Thu Oct 18 09:41:37 2018 -0400

    14345: Accept lock/unlock requests as no-ops.
    
    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 0e2f17c35..b89890956 100644
--- a/services/keep-web/cadaver_test.go
+++ b/services/keep-web/cadaver_test.go
@@ -147,6 +147,16 @@ func (s *IntegrationSuite) testCadaver(c *check.C, password string, pathFunc fun
 		},
 		{
 			path:  writePath,
+			cmd:   "lock newdir0/testfile\n",
+			match: `(?ms).*Locking .* succeeded.*`,
+		},
+		{
+			path:  writePath,
+			cmd:   "unlock newdir0/testfile\nasdf\n",
+			match: `(?ms).*Unlocking .* succeeded.*`,
+		},
+		{
+			path:  writePath,
 			cmd:   "ls\n",
 			match: `(?ms).*newdir0.* 0 +` + matchToday + ` \d+:\d+\n.*`,
 		},
@@ -243,6 +253,11 @@ func (s *IntegrationSuite) testCadaver(c *check.C, password string, pathFunc fun
 			cmd:   "delete foo\n",
 			match: `(?ms).*Deleting .* failed:.*405 Method Not Allowed.*`,
 		},
+		{
+			path:  pdhPath,
+			cmd:   "lock foo\n",
+			match: `(?ms).*Locking .* failed:.*405 Method Not Allowed.*`,
+		},
 	} {
 		c.Logf("%s %+v", "http://"+s.testServer.Addr, trial)
 		if skip != nil && skip(trial.path) {
diff --git a/services/keep-web/handler.go b/services/keep-web/handler.go
index 95948e325..6aeb7b9c4 100644
--- a/services/keep-web/handler.go
+++ b/services/keep-web/handler.go
@@ -143,20 +143,24 @@ var (
 	writeMethod = map[string]bool{
 		"COPY":   true,
 		"DELETE": true,
+		"LOCK":   true,
 		"MKCOL":  true,
 		"MOVE":   true,
 		"PUT":    true,
 		"RMCOL":  true,
+		"UNLOCK": true,
 	}
 	webdavMethod = map[string]bool{
 		"COPY":     true,
 		"DELETE":   true,
+		"LOCK":     true,
 		"MKCOL":    true,
 		"MOVE":     true,
 		"OPTIONS":  true,
 		"PROPFIND": true,
 		"PUT":      true,
 		"RMCOL":    true,
+		"UNLOCK":   true,
 	}
 	browserMethod = map[string]bool{
 		"GET":  true,

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list