0011-00000009

更新时间:
复制 MD 格式

Problem description

The Cache-Control field value contains invalid characters.

Causes

OSS rejects Cache-Control values that contain control characters. The most common invalid characters are \r (carriage return) and \n (line feed).

Examples

The following example shows a PostObject request that specifies Cache-Control to control caching behavior for the uploaded object. The Cache-Control field accepts these values:

ValueBehavior
no-cacheThe cache is revalidated with the origin server on each access. If the object has not changed, the cached copy is used; otherwise, the updated object is downloaded.
no-storeThe object is not cached anywhere.
publicThe object can be cached by any cache, including shared caches.
privateThe object is cached only in the client's private cache.
max-age=<seconds>The validity period of the cached object, in seconds. This value is available only in HTTP/1.1.

If the Cache-Control value contains invalid characters such as \r or \n, OSS returns this error.

Solutions

Strip all control characters from the Cache-Control value before submitting the request. In particular, check for \r and \n.

For more information about setting object metadata including Cache-Control, see Manage object metadata.

References