dsv38843 2017-12-18 22:38
浏览 38
已采纳

蓝色存储副本:HTTP标头之一的值格式不正确

I'm using this library.

When I run:

b := container.GetBlobReference("bar")
err := b.Copy("foo", nil)

I get:

storage: service returned error: StatusCode=400, ErrorCode=InvalidHeaderValue, ErrorMessage=The value for one of the HTTP headers is not in the correct format. RequestId:66d0164b-001e-0028-2c4f-78a847000000 Time:2017-12-18T22:26:59.9585462Z, RequestInitiated=Mon, 18 Dec 2017 22:26:59 GMT, RequestId=66d0164b-001e-0028-2c4f-78a847000000, API Version=2016-05-31, QueryParameterName=, QueryParameterValue=

File "foo" does exist.

Perhaps the hint is in QueryParameterName and QueryParameterValue having no values.

  • 写回答

1条回答 默认 最新

  • douti0467 2017-12-19 01:56
    关注

    The source to Copy must be absolute:

    destBlob := h.client.GetBlobReference(to)
    sourceBlob := h.client.GetBlobReference(from)
    err := destBlob.Copy(sourceBlob.GetURL(), nil)
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?