Bug #4192

[Keep] Should be able to PUT 0-length Keep block through keepproxy

Added by Peter Amstutz over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Keep
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
0.5

Description

I believe the below should do the trick, but when I last tried this, it broke the tests.

diff --git a/services/keepproxy/keepproxy.go b/services/keepproxy/keepproxy.go
index de4ccaf..e715eea 100644
--- a/services/keepproxy/keepproxy.go
+++ b/services/keepproxy/keepproxy.go
@@ -339,7 +339,7 @@ func (this PutBlockHandler) ServeHTTP(resp http.ResponseWriter, req *http.Reques

        log.Printf("%s: %s %s Content-Length %v", GetRemoteAddress(req), req.Method, hash, contentLength)

-       if contentLength < 1 {
+       if contentLength < 0 {
                http.Error(resp, "Must include Content-Length header", http.StatusLengthRequired)
                return
        }

History

#1 Updated by Brett Smith over 6 years ago

  • Subject changed from Should be able to PUT 0-length Keep block through keepproxy to [Keep] Should be able to PUT 0-length Keep block through keepproxy
  • Category set to Keep

#2 Updated by Peter Amstutz over 6 years ago

  • Target version set to Arvados Future Sprints

#3 Updated by Ward Vandewege over 6 years ago

  • Description updated (diff)

#4 Updated by Ward Vandewege over 6 years ago

  • Story points set to 0.5

#5 Updated by Peter Amstutz over 6 years ago

  • Target version changed from Arvados Future Sprints to 2015-01-07 sprint

#6 Updated by Peter Amstutz over 6 years ago

  • Status changed from New to Resolved
  • Assigned To set to Peter Amstutz

Fixed in 420d88e

Also available in: Atom PDF