[ARVADOS] updated: 1.1.1-263-g7aa1bc6
Git user
git at public.curoverse.com
Fri Dec 15 10:16:37 EST 2017
Summary of changes:
services/keep-web/handler.go | 6 +++---
services/keep-web/webdav.go | 15 +++++++--------
2 files changed, 10 insertions(+), 11 deletions(-)
via 7aa1bc6eaf4d340d6e45226003b776d521309d69 (commit)
from 737f7d618ffc18152c5d09416884910bd180d890 (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 7aa1bc6eaf4d340d6e45226003b776d521309d69
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Fri Dec 15 10:14:13 2017 -0500
12715: Rename flag !reading => alwaysReadEOF.
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 4cb2fdb..19a2040 100644
--- a/services/keep-web/handler.go
+++ b/services/keep-web/handler.go
@@ -441,9 +441,9 @@ func (h *handler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) {
h := webdav.Handler{
Prefix: "/" + strings.Join(pathParts[:stripParts], "/"),
FileSystem: &webdavFS{
- collfs: fs,
- writing: writeMethod[r.Method],
- reading: r.Method != "PROPFIND",
+ collfs: fs,
+ writing: writeMethod[r.Method],
+ alwaysReadEOF: r.Method == "PROPFIND",
},
LockSystem: h.webdavLS,
Logger: func(_ *http.Request, err error) {
diff --git a/services/keep-web/webdav.go b/services/keep-web/webdav.go
index 98e6f01..af83681 100644
--- a/services/keep-web/webdav.go
+++ b/services/keep-web/webdav.go
@@ -38,7 +38,12 @@ var (
type webdavFS struct {
collfs arvados.CollectionFileSystem
writing bool
- reading bool
+ // webdav PROPFIND reads the first few bytes of each file
+ // whose filename extension isn't recognized, which is
+ // prohibitively expensive: we end up fetching multiple 64MiB
+ // blocks. Avoid this by returning EOF on all reads when
+ // handling a PROPFIND.
+ alwaysReadEOF bool
}
func (fs *webdavFS) makeparents(name string) {
@@ -73,13 +78,7 @@ func (fs *webdavFS) OpenFile(ctx context.Context, name string, flag int, perm os
// have 405.
f = writeFailer{File: f, err: errReadOnly}
}
- if !fs.reading {
- // webdav PROPFIND reads the first few bytes of each
- // file whose filename extension isn't recognized,
- // which is prohibitively expensive: we end up
- // fetching multiple 64MiB blocks. Avoid this by
- // returning EOF on all reads when handling a
- // PROPFIND.
+ if fs.alwaysReadEOF {
f = readEOF{File: f}
}
return
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list