更新时间:2025-01-26 gmt 08:00

下载对象-九游平台

功能介绍

get操作从对象存储下载对象。使用get接口前,请确认必须拥有对象的read权限。如果对象owner向匿名用户授予read访问权限,则可以在不使用鉴权头域的情况下访问该对象。

服务端加密

如果客户端的对象上传时,使用了客户提供的加密密钥进行服务端加密,当下载对象时,同样也必须在消息中提供密钥。

多版本

默认情况下,获取的是最新版本的对象。如果最新版本的对象是删除标记,则返回对象不存在。如果要获取指定版本的对象,请求可携带versionid消息参数。

归档存储或深度归档存储对象

如果要下载的对象是归档存储或深度归档存储类对象,由于对象存储在存档设备中,您必须先使用对象恢复,然后才能下载该归档存储或深度归档存储对象。对象处于不同的恢复状态时,给出不同响应:如果对象已恢复,下载对象成功时需要返回x-obs-restore头域指示恢复失效时间。对未恢复或正在恢复的归档存储或深度归档存储对象发送下载请求时,会返回错误403 forbidden。

请求消息样式

1
2
3
4
5
6
get/objectnamehttp/1.1
host:bucketname.obs.cn-north-4.myhuaweicloud.com
date:date
authorization:authorization
range:bytes=byte_range
additionalheader>

其中range字段可选,如果没有的话得到全部内容。

请求消息参数

get操作获取对象内容时,允许用户通过请求参数的方式对一些消息头值进行重写,可以重写的消息头有:content-type、content-language、expires、cache-control、content-disposition以及content-encoding共6个。另外所需恢复的对象拥有多个版本时,可以通过versionid参数,指定需要下载的版本。具体的说明如表1所示。

obs不会处理请求中携带的accept-encoding,也不会对上传的数据做任何压缩、解压的操作,压缩解压的操作由客户端决定。某些httpclient在默认情况下可能会根据服务端返回的content-encoding对数据做相应的解压处理,客户端程序需要根据自己的需求决定是否做解压处理以及如何解压(修改obs端保存的对象元数据content-encoding或者在下载对象时对content-encoding进行重写)。如果在下载对象的请求中指明了重写消息头,obs返回的http标准消息头中将以请求中指定的重写内容为准。

表1 请求消息参数

参数名称

参数类型

是否必选

描述

response-content-type

string

参数解释:

下载对象时重写响应中的content-type头。

约束限制:

取值范围:

参见http标准头域content-type的取值。

默认取值:

response-content-language

string

参数解释:

下载对象时重写响应中的content-language头。

约束限制:

取值范围:

参见http标准头域content-language的取值。

默认取值:

response-expires

string

参数解释:

下载对象时重写响应中的expires头。

约束限制:

取值范围:

参见http标准头域expires的取值。

默认取值:

response-cache-control

string

参数解释:

下载对象时重写响应中的cache-control头。

约束限制:

取值范围:

参见http标准头域cache-control的取值。

默认取值:

response-content-disposition

string

参数解释:

下载对象时重写响应中的content-disposition头。

示例:

response-content-disposition=attachment; filename*=utf-8''name1

下载对象重命名为“name1”,如果name1中存在中文,需要将中文进行url编码。

约束限制:

取值范围:

默认取值:

response-content-encoding

string

参数解释:

下载对象时重写响应中的content-encoding头。

约束限制:

取值范围:

参见http标准头域content-encoding的取值。

默认取值:

versionid

string

参数解释:

对象的版本号,用于指定获取对象的版本号。

约束限制:

取值范围:

长度为32的字符串。

默认取值:

无,如果不设置则默认获取最新版本的对象。

x-image-process

string

参数解释:

图片处理服务,描述针对对象的图片处理命令或处理样式。

示例:

命令方式:x-image-process=image/commands

样式方式:x-image-process=style/stylename

详见《图片处理特性指南》

约束限制:

取值范围:

命令方式:image/命令参数。

样式方式:style/样式名称。

默认取值:

如果不输入处理命令,将返回原图。

attname

string

参数解释:

下载对象时重写响应中的content-disposition头。

示例:

attname=name1

下载对象重命名为“name1”。

约束限制:

取值范围:

默认取值:

请求消息头

该请求除使用公共消息头外,还可以使用附加的消息头来完成获取对象的功能,消息头的意义如表2所示。

表2 请求消息头

消息头名称

消息头类型

是否必选

描述

range

string

参数解释:

获取对象时,获取在range范围内的对象内容。如果range不合法则忽略此字段获取整个对象。

约束限制:

  • range是一个范围,它的起始值最小为0,最大为对象长度减1。range范围的起始值为必填项,如果range只包含起始值,表示获取起始值到对象长度减1这个区间的对象内容。

    bytes=byte_range

    示例1:bytes=0-4

    示例2:bytes=1024

    示例3:bytes=10-20,30-40(表示多个区间)

  • 携带range头域后,响应消息的etag仍是对象的etag,而不是range范围内对象的etag。

取值范围:

range是一个范围,它的起始值最小为0,最大为对象长度减1。

默认取值:

if-modified-since

符合http://www.ietf.org/rfc/rfc2616.txt规定格式的http时间字符串。

参数解释:

如果对象在请求中指定的时间之后有修改,则返回对象内容;否则的话返回304(not modified)。

约束限制:

此参数指定的时间不能晚于当前的服务器时间(gmt时间),否则参数不生效。

取值范围:

符合http://www.ietf.org/rfc/rfc2616.txt规定格式的http时间字符串。

  1. eee, dd mmm yyyy hh:mm:ss z
  2. eeee, dd-mmm-yy hh:mm:ss z
  3. eee mmm dd hh:mm:ss yyyy

对应示例:

  1. if-modified-since: sun, 06 nov 1994 08:49:37 gmt
  2. if-modified-since: sunday, 06-nov-94 08:49:37 gmt
  3. if-modified-since: sun nov 6 08:49:37 1994

默认取值:

if-unmodified-since

符合http://www.ietf.org/rfc/rfc2616.txt规定格式的http时间字符串。

参数解释:

如果对象在请求中指定的时间之后没有修改,则返回对象内容;否则的话返回412(precondition failed)。

约束限制:

此参数指定的时间不能晚于当前的服务器时间(gmt时间),否则参数不生效。

取值范围:

符合http://www.ietf.org/rfc/rfc2616.txt规定格式的http时间字符串。

  1. eee, dd mmm yyyy hh:mm:ss z
  2. eeee, dd-mmm-yy hh:mm:ss z
  3. eee mmm dd hh:mm:ss yyyy

对应示例:

  1. if-unmodified-since: sun, 06 nov 1994 08:49:37 gmt
  2. if-unmodified-since: sunday, 06-nov-94 08:49:37 gmt
  3. if-unmodified-since: sun nov 6 08:49:37 1994

默认取值:

if-match

string

参数解释:

如果对象的etag和请求中指定的etag相同,则返回对象内容,否则的话返回412(precondition failed)。

(etag值,例:0f64741bf7cb1089e988e4585d0d3434)

约束限制:

取值范围:

对象的etag

默认取值:

if-none-match

string

参数解释:

如果对象的etag和请求中指定的etag不相同,则返回对象内容,否则的话返回304(not modified)。

(etag值,例:0f64741bf7cb1089e988e4585d0d3434)

约束限制:

取值范围:

对象的etag

默认取值:

x-obs-server-side-encryption-customer-algorithm

string

否。当使用sse-c方式时,必选。

参数解释:

在sse-c加密方式下使用该头域,该头域表示加密使用的算法。

示例:x-obs-server-side-encryption-customer-algorithm:aes256

约束限制

需要和x-obs-server-side-encryption-customer-key、 x-obs-server-side-encryption-customer-key-md5一起使用。

取值范围:

aes256

默认取值:

x-obs-server-side-encryption-customer-key

string

否。当使用sse-c方式时,必选。

参数解释:

在sse-c加密方式下使用该头域,该头域表示加密使用的密钥。该密钥用于解密对象。

示例:x-obs-server-side-encryption-customer-key:k7qkypbkm5 hca27fsnkunnvaobncnlht/rcb2o/9cw=

约束限制

该头域由256-bit的密钥经过base64-encoded得到,需要和x-obs-server-side-encryption-customer-algorithm、x-obs-server-side-encryption-customer-key-md5一起使用。

取值范围:

默认取值:

x-obs-server-side-encryption-customer-key-md5

string

否。当使用sse-c方式时,必选。

参数解释:

在sse-c加密方式下使用该头域,该头域表示加密使用的密钥的md5值。md5值用于验证密钥传输过程中没有出错。

示例:x-obs-server-side-encryption-customer-key-md5:4xvb3tbntn tieva0/fgaq==

约束限制

该头域由密钥的128-bit md5值经过base64-encoded得到,需要和x-obs-server-side-encryption-customer-algorithm、x-obs-server-side-encryption-customer-key一起使用。

取值范围:

密钥id md5的base64值。

默认取值:

请求消息元素

该请求消息中不使用消息元素。

响应消息样式

1
2
3
4
5
6
7
8
http/1.1status_code
content-type:type
date:date
content-length:length
etag:etag
last-modified:time
content>

响应消息头

该请求的响应消息使用公共消息头,具体请参考表1

除公共响应消息头之外,还可能使用如下表3中的消息头。

表3 附加响应消息头

消息头名称

消息头类型

描述

x-obs-expiration

string

参数解释:

对象的过期时间。

约束限制:

当对象单独设置了对象lifecycle,过期时间以对象lifecycle为准,该消息头用expiry-date描述对象的详细过期信息;如果对象没有设置对象lifecycle,设置了桶级别lifecycle,过期时间以桶级别lifecycle为准,该消息头用expiry-date和rule-id两个键值对描述对象的详细过期信息;否则不显示该头域。

取值范围:

时间格式为:eee, dd mmm yyyy hh:mm:ss z

示例:expiry-date=sun, 06 nov 1994 08:49:37 gmt

默认取值:

x-obs-website-redirect-location

string

参数解释:

当桶设置了website配置,就可以设置对象元数据的这个属性,website接入点返回301重定向响应,将获取这个对象的请求重定向到该属性指定的桶内另一个对象或一个外部的url,该参数指明对象的重定向地址。

例如,重定向请求到桶内另一对象:

x-obs-website-redirect-location:/anotherpage.html

或重定向请求到一个外部url:

x-obs-website-redirect-location:http://www.example.com/

obs将这个值从头域中取出,保存在对象的元数据“websiteredirectlocation”中。

约束限制:

  • 必须以“/”、“http://”或“https://”开头,长度不超过2kb。
  • obs仅支持为桶根目录下的对象设置重定向,不支持为桶中文件夹下的对象设置重定向。

默认取值:

x-obs-delete-marker

boolean

参数解释:

标识删除的对象是否是删除标记。如果不是,则响应中不会出现该消息头。

取值范围:

  • true:是删除标记。
  • false:不是删除标记。

默认取值:

false

x-obs-version-id

string

参数解释:

对象的版本号。

约束限制:

如果该对象无版本号,则响应中不会出现该消息头。

取值范围:

长度为32的字符串。

默认取值:

x-obs-server-side-encryption

string

参数解释:

该头域表示服务端的加密方式。

示例:x-obs-server-side-encryption:kms

约束限制:

如果服务端加密是sse-kms方式,响应包含该头域。

取值范围:

  • kms
  • aes256

默认取值:

x-obs-server-side-data-encryption

string

参数解释:

如果服务端加密是sse-kms方式,且数据加密算法为sm4,响应包含该头域。

示例:x-obs-server-side-data-encryption:sm4

约束限制:

取值范围:

sm4:国密sm4算法。

默认取值:

x-obs-server-side-encryption-kms-key-id

string

参数描述:

当加密方式为sse-kms且使用指定密钥加密时,需输入密钥id。密钥id获取方法请参见查看密钥

约束限制:

当您设置了x-obs-server-side-encryption头域且赋值为“kms”,即选择kms加密方式时,才能使用该头域指定加密密钥。

默认取值:

当您选择使用kms加密方式,但未设置此头域时,默认的主密钥将会被使用。如果默认主密钥不存在,系统将默认创建并使用。

x-obs-server-side-encryption-customer-algorithm

string

参数解释:

如果服务端加密是sse-c方式,响应包含该头域,该头域表示解密使用的算法。

示例:x-obs-server-side-encryption-customer-algorithm:aes256

约束限制:

取值范围:

aes256

默认取值:

x-obs-server-side-encryption-customer-key-md5

string

参数解释:

如果服务端加密是sse-c方式,响应包含该头域,该头域表示解密使用的密钥的md5值。

示例:x-obs-server-side-encryption-customer-key-md5:4xvb3tbntn tieva0/fgaq==

取值范围:

密钥id md5的base64值。

默认取值:

x-obs-object-type

string

参数解释:

对象的类型。

约束限制:

对象为非normal对象时,会返回此头域。

取值范围:

appendable

默认取值:

x-obs-next-append-position

integer

参数解释:

指明下一次请求应该提供的position。

约束限制:

对象为appendable对象时,会返回此头域。

取值范围:

默认取值:

x-obs-tagging-count

string

参数解释:

对象关联的标签个数。

示例:x-obs-tagging-count:1

约束限制:

仅当有读取标签权限时返回该参数。

取值范围:

默认取值:

响应消息元素

该请求的响应消息中不带消息元素。

错误响应消息

无特殊错误,所有错误已经包含在表2中。

请求示例:下载整个对象

1
2
3
4
5
6
get/object01http/1.1
user-agent:curl/7.29.0
host:examplebucket.obs.cn-north-4.myhuaweicloud.com
accept:*/*
date:wed,01jul201504:24:33gmt
authorization:obsh4ipjx0tqththebqqcec:nxtsms0javxllnxlo9awamtn47s=

响应示例:下载整个对象

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
http/1.1200ok
server:obs
x-obs-request-id:8df400000163d3f2a89604c49abee55e
accept-ranges:bytes
etag:"3b46eaf02d3b6b1206078bb86a7b7013"
last-modified:wed,01jul201501:20:29gmt
content-type:binary/octet-stream
x-obs-id-2:32aaaqaaeaabaaaqaaeaabaaaqaaeaabcsqwxj2i1vvxd/xgwuw2g2rqax30gdxu
date:wed,01jul201504:24:33gmt
content-length:4572
[4572bytesobjectcontent]

请求示例:指定range下载对象

指定range下载对象(下载对象单个区间内容

1
2
3
4
5
6
7
get/object01http/1.1
user-agent:curl/7.29.0
host:examplebucket.obs.cn-north-4.myhuaweicloud.com
accept:*/*
date:mon,14sep202009:59:04gmt
range:bytes=20-30
authorization:obsh4ipjx0tqththebqqcec:mnplwqmdwg30ptkawiqjall3alg=

指定range下载对象(下载对象多个区间内容

1
2
3
4
5
6
7
get/object01http/1.1
user-agent:curl/7.29.0
host:examplebucket.obs.cn-north-4.myhuaweicloud.com
accept:*/*
date:mon,14sep202010:02:43gmt
range:bytes=20-30,40-50
authorization:obsh4ipjx0tqththebqqcec:zwm7vk2d7sd9o8zrsrkehgkqdkk=

响应示例:指定range下载对象

指定range下载对象(下载对象单个区间内容

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
http/1.1206partialcontent
server:obs
x-obs-request-id:000001748c0dbc35802e360c9e869f31
accept-ranges:bytes
etag:"2200446c2082f27ed2a569601ca4e360"
last-modified:mon,14sep202001:16:20gmt
content-range:bytes20-30/4583
content-type:binary/octet-stream
x-obs-id-2:32aaaqaaeaabaaaqaaeaabaaaqaaeaabcsn2jhu4okx9nbrnzavbgawa3lt3g31g
date:mon,14sep202009:59:04gmt
content-length:11
[11bytesobjectcontent]

指定range下载对象(下载对象多个区间内容

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
http/1.1206partialcontent
server:obs
x-obs-request-id:8df400000163d3f2a89604c49abee55e
accept-ranges:bytes
etag:"2200446c2082f27ed2a569601ca4e360"
last-modified:mon,14sep202001:16:20gmt
content-type:multipart/byteranges;boundary=35bcf444-e65f-4c76-9430-7e4a68dd3d26
x-obs-id-2:32aaaqaaeaabaaaqaaeaabaaaqaaeaabcsibwfovw8eewujkqsnoianc2mnr1cdf
date:mon,14sep202010:02:43gmt
content-length:288
--35bcf444-e65f-4c76-9430-7e4a68dd3d26
content-type:binary/octet-stream
content-range:bytes20-30/4583
[11bytesobjectcontent]
--35bcf444-e65f-4c76-9430-7e4a68dd3d26
content-type:binary/octet-stream
content-range:bytes40-50/4583
[11bytesobjectcontent]
--35bcf444-e65f-4c76-9430-7e4a68dd3d26

请求示例:下载缩放图片

1
2
3
4
5
6
get/example.jpg?x-image-process=image/resize,w_100http/1.1
user-agent:curl/7.29.0
host:examplebucket.obs.cn-north-4.myhuaweicloud.com
accept:*/*
date:wed,01jul201504:20:51gmt
authorization:obsh4ipjx0tqththebqqcec:9nsx45wjavxllnxlo9awasxn83n=

响应示例:下载缩放图片

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
http/1.1200ok
server:obs
x-obs-request-id:8df400000163d3f2a89604c49abee55e
x-image-process:image/resize,w_100
accept-ranges:bytes
etag:"3b46eaf02d3b6b1206078bb86a7b7013"
last-modified:wed,01jul201501:20:29gmt
content-type:image/jpeg
x-obs-id-2:32aaaqaaeaabaaaqaaeaabaaaqaaeaabcsqwxj2i1vvxd/xgwuw2g2rqax30gdxu
date:wed,01jul201504:20:51gmt
content-length:49
[49bytesobjectcontent]

请求示例:判断对象etag值

如果对象etag值匹配则下载该对象

1
2
3
4
5
6
7
get/object01http/1.1
user-agent:curl/7.29.0
host:examplebucket.obs.cn-north-4.myhuaweicloud.com
accept:*/*
date:wed,01jul201504:24:33gmt
if-match:682e760adb130c60c120da3e333a8b09
authorization:obsh4ipjx0tqththebqqcec:nxtsms0javxllnxlo9awamtn47s=

响应示例:判断对象etag值,etag不匹配

如果存储的对象的etag值不是682e760adb130c60c120da3e333a8b09,则提示下载失败

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
http/1.1412preconditionfailed
server:obs
x-obs-request-id:8df400000163d3f2a89604c49abee55e
content-type:application/xml
x-obs-id-2:32aaaqaaeaabaaaqaaeaabaaaqaaeaabcsqwxj2i1vvxd/xgwuw2g2rqax30gdxu
date:wed,01jul201504:20:51gmt


preconditionfailed
atleastoneofthepre-conditionsyouspecifieddidnothold
8df400000163d3f2a89604c49abee55e
ha0zgaskvm ulorcxxtx4qn1alzvoeblctvxraqa7pty10mzuuw/yozfue04lbqu
if-match

响应示例:判断对象etag值匹配,下载成功

如果存储的对象的etag值是682e760adb130c60c120da3e333a8b09,则下载成功

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
http/1.1200ok
server:obs
x-obs-request-id:5deb00000164a21e1fc826c58f6ba001
accept-ranges:bytes
etag:"682e760adb130c60c120da3e333a8b09"
last-modified:mon,16jul201508:03:34gmt
content-type:application/octet-stream
x-obs-id-2:32aaaqaaeaabaaaqaaeaabaaaqaaeaabcsbkdml1slsvknoharcowri 6 ustdwk
date:mon,16jul201508:04:00gmt
content-length:8
[8bytesobjectcontent]

请求示例:在url中携带签名下载对象

get /object02?accesskeyid=h4ipjx0tqththebqqcec&expires=1532688887&signature=eqmduohalurzrzrnzxws72cxexm= http/1.1
user-agent: curl/7.29.0
host: examplebucket.obs.cn-north-4.myhuaweicloud.com
accept: */*
date: fri, 27 jul 2018 10:52:31 gmt

响应示例:在url中携带签名下载对象

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
http/1.1200ok
server:obs
x-obs-request-id:804f00000164db5e5b7fb908d3ba8e00
etag:"682e760adb130c60c120da3e333a8b09"
last-modified:mon,16jul201508:03:34gmt
content-type:application/octet-stream
x-obs-id-2:32aaaujaiaabaaaqaaeaabaaaqaaeaabctlpxiljhvk/hekowip8wn2iwmqoerfw
date:fri,27jul201810:52:31gmt
content-length:8
[8bytesobjectcontent]

请求示例:下载对象并重命名,使用response-content-disposition参数

下载对象并重命名,使用response-content-disposition参数实现

1
2
3
4
5
6
get/object01?response-content-disposition=attachment;filename*=utf-8''name1http/1.1
user-agent:curl/7.29.0
host:examplebucket.obs.cn-north-4.myhuaweicloud.com
accept:*/*
date:wed,01jul201504:24:33gmt
authorization:obsh4ipjx0tqththebqqcec:nxtsms0javxllnxlo9awamtn47s=

响应示例:下载对象并重命名,使用response-content-disposition参数

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
http/1.1200ok
server:obs
x-obs-request-id:804f00000164db5e5b7fb908d3ba8e00
etag:"682e760adb130c60c120da3e333a8b09"
last-modified:mon,16jul201508:03:34gmt
content-type:application/octet-stream
x-obs-id-2:32aaaujaiaabaaaqaaeaabaaaqaaeaabctlpxiljhvk/hekowip8wn2iwmqoerfw
date:fri,27jul201810:52:31gmt
content-length:8
content-disposition:attachment;filename*=utf-8''name1
[8bytesobjectcontent]

请求示例:下载对象并重命名,使用attname参数

下载对象并重命名,使用attname参数实现

1
2
3
4
5
6
get/object01?attname=name1http/1.1
user-agent:curl/7.29.0
host:examplebucket.obs.cn-north-4.myhuaweicloud.com
accept:*/*
date:wed,01jul201504:24:33gmt
authorization:obsh4ipjx0tqththebqqcec:nxtsms0javxllnxlo9awamtn47s=

响应示例:下载对象并重命名,使用attname参数

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
http/1.1200ok
server:obs
x-obs-request-id:804f00000164db5e5b7fb908d3ba8e00
etag:"682e760adb130c60c120da3e333a8b09"
last-modified:mon,16jul201508:03:34gmt
content-type:application/octet-stream
x-obs-id-2:32aaaujaiaabaaaqaaeaabaaaqaaeaabctlpxiljhvk/hekowip8wn2iwmqoerfw
date:fri,27jul201810:52:31gmt
content-length:8
content-disposition:attachment;filename*=utf-8''name1
[8bytesobjectcontent]

请求示例:带自定义返回消息头

get /obj001?response-expires=thu, 01 feb 2015 17:00:00 gmt http/1.1
user-agent: curl/7.29.0
host: examplebucket.obs.region.myhuaweicloud.com
accept: */*
date: wed, 01 jul 2015 02:37:22 gmt
authorization: obs udsiamstubtest000003:2tod8lyzoga0 46hmjmp176xrai=

响应示例:带自定义返回消息头

server: obs
x-obs-id-2: 32aaaqaaeaabsaagaaeaabaaaqaaeaabcsmpl2dv6zzlm2hmurxktai258mpqmrp
x-obs-request-id: 0000018a2a73af59d3085c8f8abf0c65
accept-ranges: bytes
etag: "21e7e5efb6b73de19e691d6c4e32a9cf"
content-disposition: attachment
date: wed, 01 jul 2015 02:37:22 gmt
expires: thu, 01 feb 2015 17:00:00 gmt
content-type: binary/octet-stream
content-length: 392
 
[392 bytes object content]

请求示例:指定versionid访问指定版本对象

get /obj001?versionid=g001118a6803675affffd3043f7f91d0 http/1.1
user-agent: curl/7.29.0
host: examplebucket.obs.region.myhuaweicloud.com
accept: */*
date: wed, 01 jul 2015 02:37:22 gmt
authorization: obs udsiamstubtest000003:2tod8lyzoga0 46hmjmp176xrai=

响应示例:指定versionid访问指定版本对象

server: obs
x-obs-id-2: 32aaaqaaeaabsaagaaeaabaaaqaaeaabcsmpl2dv6zzlm2hmurxktai258mpqmrp
x-obs-request-id: 0000018a2a73af59d3085c8f8abf0c65
accept-ranges: bytes
x-obs-version-id: g001118a6803675affffd3043f7f91d0
etag: "21e7e5efb6b73de19e691d6c4e32a9cf"
content-disposition: attachment
date: wed, 01 jul 2015 02:37:22 gmt
content-type: binary/octet-stream
content-length: 392
 
[392 bytes object content]

请求示例:获取使用服务器端加密存储的对象

get /obj001 http/1.1
user-agent: curl/7.29.0
host: examplebucket.obs.region.myhuaweicloud.com
accept: */*
date: wed, 01 jul 2015 02:37:22 gmt
authorization: obs udsiamstubtest000003:2tod8lyzoga0 46hmjmp176xrai=
x-obs-server-side-encryption-customer-key:d09s2lks9cmqo9135fqxmcv8fsop02adwd441g
x-obs-server-side-encryption-customer-key-md5:zjqpad35fiw1322fwa
x-obs-server-side-encryption-customer-algorithm:aes256

响应示例:获取使用服务器端加密存储的对象

server: obs
x-obs-id-2: 32aaaqaaeaabsaagaaeaabaaaqaaeaabcsmpl2dv6zzlm2hmurxktai258mpqmrp
x-obs-request-id: 0000018a2a73af59d3085c8f8abf0c65
accept-ranges: bytes
etag: "21e7e5efb6b73de19e691d6c4e32a9cf"
content-disposition: attachment
date: wed, 01 jul 2015 02:37:22 gmt
content-type: binary/octet-stream
content-length: 392
x-obs-server-side-encryption-customer-key-md5:zjqpad35fiw1322fwa
x-obs-server-side-encryption-customer-algorithm:aes256
 
[392 bytes object content]

相关文档

网站地图