3762: create NewWorkQueue instances of pullq and trashq in handers_test and remove...
[arvados.git] / services / keepstore / handlers.go
index bd1ca67bfc26643190b2e94a0169bc58f2030c88..f120f05dc454086580c96df6d9960e9cf97491c3 100644 (file)
@@ -175,7 +175,7 @@ func GetBlockHandler(resp http.ResponseWriter, req *http.Request) {
                return
        }
 
-       resp.Header().Set("X-Block-Size", fmt.Sprintf("%d", len(block)))
+       resp.Header().Set("Content-Length", fmt.Sprintf("%d", len(block)))
 
        _, err = resp.Write(block)
 
@@ -460,10 +460,6 @@ func PullHandler(resp http.ResponseWriter, req *http.Request) {
        for _, p := range pr {
                plist.PushBack(p)
        }
-
-       if pullq == nil {
-               pullq = NewWorkQueue()
-       }
        pullq.ReplaceQueue(plist)
 }
 
@@ -498,10 +494,6 @@ func TrashHandler(resp http.ResponseWriter, req *http.Request) {
        for _, t := range trash {
                tlist.PushBack(t)
        }
-
-       if trashq == nil {
-               trashq = NewWorkQueue()
-       }
        trashq.ReplaceQueue(tlist)
 }