18790: Fix range used for checking file size.
authorTom Clegg <tom@curii.com>
Wed, 5 Apr 2023 18:20:46 +0000 (14:20 -0400)
committerTom Clegg <tom@curii.com>
Wed, 5 Apr 2023 18:20:46 +0000 (14:20 -0400)
When the file does not exist yet,

Range: 0-0 => 416 (requested range not satisfiable)

Range: -0 => 404 (file not found)

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

cmd/arvados-client/container_gateway.go
lib/controller/localdb/container_gateway.go

index 86af6be5838028581e4cc90102cf57f724a6d062..2f45e75188b79baedd82f10f3983f701fccd330b 100644 (file)
@@ -91,7 +91,7 @@ poll:
                // server-sent event to tell us some updated file
                // sizes. For now, we poll.
                for _, fnm := range watching {
-                       currentsize, _, err := lc.copyRange(ctx, ctrUUID, fnm, "0-0", nil)
+                       currentsize, _, err := lc.copyRange(ctx, ctrUUID, fnm, "-0", nil)
                        if err != nil {
                                if !anySuccess {
                                        return err
@@ -183,7 +183,7 @@ poll:
 // Retrieve specified byte range (e.g., "12-34", "1234-") from given
 // fnm and write to out.
 //
-// If range is empty ("0-0"), out can be nil.
+// If range is empty ("-0"), out can be nil.
 //
 // Return values are current file size, bytes copied, error.
 //
index 59592ece9f6bb27abde6f14ecda88a249694e9fd..c584509228740fe66f5cc4935f52126dc5c35476 100644 (file)
@@ -187,7 +187,7 @@ func (conn *Conn) serveContainerLogViaKeepWeb(opts arvados.ContainerLogOptions,
                }
        }
        if !ok {
-               httpserver.Error(w, "no internalURLs configured for WebDAV service", http.StatusInternalServerError)
+               httpserver.Error(w, "no internalURLs configured for WebDAVDownload service", http.StatusInternalServerError)
                return
        }
        proxy := &httputil.ReverseProxy{