萬盛學電腦網

 萬盛學電腦網 >> 服務器教程 >> OSS不支持的操作

OSS不支持的操作

 如果試圖以不支持的操作來訪問某個資源,返回405 Method Not Allowed錯誤


請求示例:
abc /BucketName HTTP/1.1
Host: storage.aliyun.com
Date: date
Authorization: signatureValue

返回消息頭示例:
x-oss-request-id: 2403382433A2EDA8
Allow: GET, DELETE, HEAD, PUT
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Thu, 31 Mar 2011 10:01:52 GMT
Server: AliyunOSS

返回消息體示例:
<?xml version="1.0" ?>
<Error>
	<Code>
		MethodNotAllowed
	</Code>
	<Message>
		The specified method is not allowed against this resource.
	</Message>
	<ResourceType>
		BUCKET
	</ResourceType>
	<Method>
		abc
	</Method>
	<RequestId>
		2403382433A2EDA8
	</RequestId>
	<HostId>
		storage.aliyun.com
	</HostId>
</Error>

注意:如果訪問的資源是 /bucket/, ResourceType應該是bucket,如果訪問的資源是 /bucket/object,ResourceType應該是object。

 

copyright © 萬盛學電腦網 all rights reserved