在PUT
请求期间,使用正确的 Authorization 标头创建新的 BLOB,当我尝试将PUT
文件放入容器时,我的进程收到“404 Resource Not Found”错误。
https://accountNameHere.blob.core.windows.net/containerNameHere
容器名称和帐户名称都正确。
为什么会失败?
以下是原始请求标头:
PUT /testss HTTP/1.1
Host: accountName.blob.core.windows.net
Accept: */*
Connection: Keep-Alive
0: content-encoding
1: content-language
2: content-length
3: content-md5
4: content-type
5: date
6: if-modified-since
7: if-match
8: if-none-match
9: if-unmodified-since
10: range
x-ms-blob-type: BlockBlob
x-ms-version: 2011-08-18
x-ms-date: Fri, 09 Aug 2013 04:17:59 GMT
Content-Length: 126377
Authorization: SharedKey accountName:MBVLmoxzxZr+tf8EZw2GkbFLEHuNn8FNAaEHrcty/cM=
Expect: 100-continue
这是我发送的要签名的字符串:
PUT x-ms-blob-type:BlockBlob x-ms-date:Fri, 09 Aug 2013 04:03:20 GMT x-ms-version:2011-08-18 /accountName/test
这是他们所期望的:
PUT 126377 x-ms-blob-type:BlockBlob x-ms-date:Fri, 09 Aug 2013 04:02:17 GMT x-ms-version:2011-08-18 /accountName/test
两者之间的唯一区别是126377
after PUT
。那是文件的内容长度,我只是不确定如何删除它。