Merge branch 'master' into 11850-singlecontainer-max-requirements
[arvados.git] / services / keepstore / azure_blob_volume_test.go
index 4b015a9962d170e47c9f8fdd401d6c63bdd569ea..06216edcb82aeddc3617c121cecc4e1a6387be4a 100644 (file)
@@ -1,3 +1,7 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
 package main
 
 import (
@@ -120,6 +124,11 @@ func (h *azStubHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
                return
        }
 
+       if (r.Method == "PUT" || r.Method == "POST") && r.Header.Get("Content-Length") == "" {
+               rw.WriteHeader(http.StatusLengthRequired)
+               return
+       }
+
        body, err := ioutil.ReadAll(r.Body)
        if err != nil {
                return