Request Headers

This table describes request headers you can use with different storage operations:

Header

Type

Description

Operations

Usage

Authorization

String

Authenticates requestor

All operations

Required except for operations accessible to anonymous user

Cache-control

String

Specifies directives that may override existing caching mechanisms and prevent caches from interfering with the HTTP request or response(Available in release H and later.)

All operations

Optional

Content-Disposition

String

Specifies the presentation format for the object

PUT Object and PUT Object acl

Optional

Content-Encoding

String

Specifies object content encodings, enabling determination of decoding mechanisms for the media type returned in the Content-Type header

PUT Object and PUT Object acl

Optional

Content-Length

String

Message length (without headers)

All operations

Required for PUT operations that load ACLs or other XML content

Content-MD5

String

Integrity check specifying a base64 encoded, 128-bit MD5 hash of the message without its headers, used to determine that the original data is returned unchanged

PUT Object and PUT Object acl

Optional

Content-Type

String

Resource content type (e.g., text/plain) (For PUT operations, default is binary/octet-stream, and valid values are MIME types.)

All operations

Optional

Date

String

Requestor date and time (e.g;, Tues, 14 Jun 2011 08:30:00 GMT)

All operations

Required unless using x-amz-date

Expect

String

Requests an acknowledgment before sending the message body when the sending application issues a 100-continue message; body not sent when its headers are refused

PUT Object and PUT Object acl

Optional

Expires

String

Indicates the period during which files can stay in a client browser cache(Available in release H and later.)

All operations

Optional

Host

String

Host URI (e.g., rs2.StorageService.com or BucketName.rs2.StorageService.com

All operations

Required

If-Match

String

Requests only objects with entity tags (ETags) that match the specified string; otherwise, a 412 HTTP error is returned

GET Object and Head Object

Optional

If-Modified-Since

String

Requests only objects modified after a specified time; otherwise, a 412 HTTP error is returned

GET Object and Head Object

Optional

If-None-Match

String

Requests only objects with ETags that do not match the specified string; otherwise, a 412 HTTP error is returned

GET Object and Head Object

Optional

If-Unmodified-Since

String

Requests only objects not modified after a specified time; otherwise, a 304 HTTP error is returned

GET Object and Head Object

Optional

Range

String

Requests the range bytes of an object

GET Object and Head Object

Optional

x-amz-acl

String

Sets ACL of bucket or object you are creating. (Valid values are private (default), public-read, public-read-write, authenticated-read, bucket-owner-read, and bucket-owner-full-control.)

PUT Bucket and all PUT Object operations

Optional

x-amz-copy-source

String

Specifies a URL encoded string for the name of source bucket and the key name of the object, separated be a forward slash (Requires source object READ access.)

PUT Object (Copy)

Required

x-amz-copy-source-if-match

String

Copies only objects that match a specified ETag; otherwise, a 412 HTTP error is returned

PUT Object (Copy)

Optional (Can use with x-amz-copy-source-if-unmodified-since, but no other optional header)

x-amz-copy-source-if-modified-since

String

Copies only objects that have been modified after a specified time; otherwise, a 412 HTTP error is returned (Must be a valid HTTP date.)

PUT Object (Copy)

Optional (Can use with x-amz-copy-source-if-none-match, but no other optional header)

x-amz-copy-source-if-none-match

String

Copies only objects that do not match a specified ETag; otherwise, a 412 HTTP error is returned

PUT Object (Copy),

Optional (Can use with x-amz-copy-source-if-modified-since, but no other optional header)

x-amz-copy-source-if-unmodified-since

String

Copies only objects that have not been modified after a specified time; otherwise, a 412 HTTP error is returned (Must be a valid HTTP date.)

PUT Object (Copy)

Optional (Can use with x-amz-copy-source-if-match, but no other optional header)

x-amz-date

String

May be used in place of the HTTP Date header. If this header is present, an empty string is used for the date header in the StringToSign. The timestamp sent by the client must be within a 15 minute range of the server System Time. Otherwise, the request will fail with a RequestTimeTooSkewed error.

All operations

Optional

x-amz-meta-

String

Metadata to be stored and returned with an object; the size of the HTTP request excluding the message body cannot be more than 8KB

PUT Object and PUT Object acl

Optional

x-amz-metadata-directive

String

Specifies whether to copy or replace metadata of the object being copied (Values are COPY (default) and REPLACE.

PUT Object (Copy)

Optional

x-amz-storage-class

String

Enables asynchronous writes for geo-distributed Rings.

PUT Object and PUT Object (Copy)

Optional

X-Forward-For

String

Specifies the IP address of a proxy server in between the client and the connector.

All operations,

Required if using a proxy