Azure storage: Unable to upload block blob with size 0 RRS feed

  • Question

  • Our applicaiton has a requirement to upload the blob with size 0. We are using cURL to invoke Azure storage REST API. While uploading with size it failing with HTTP error code [400]

    Following error message it returned

    <?xml version="1.0" encoding="utf-8"?>
                      The value for one of the HTTP headers 
                      is not in the correct format.

    Through wireshark, we ensured that, the value of content length header is sent appropriatly.

    Following are the captured headers from wireshark

    PUT /test/DC70439C-5004-11E6-B4B2-91D87435845D HTTP/1.1
    Host: mytest.blob.core.windows.net
    Accept: */*
    Transfer-Encoding: chunked
    x-ms-date:Fri, 22 Jul 2016 12:07:28 GMT
    Authorization:SharedKey   kanchan:HQQ7a47TPQtEhL0ek6rim64ZKC8NRubgKuq+4Os+Aoo=
    Expect: 100-continue

    Can you plese help to figure out why content-length header value has been set as -1?

    Thanks and regards, Rahul Naik

    Friday, July 22, 2016 12:34 PM

All replies