2019-07-03 01:34:32 -04:00
|
|
|
/*
|
|
|
|
* MinIO Cloud Storage, (C) 2019 MinIO, Inc.
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package http
|
|
|
|
|
|
|
|
// Standard S3 HTTP response constants
|
|
|
|
const (
|
|
|
|
LastModified = "Last-Modified"
|
|
|
|
Date = "Date"
|
|
|
|
ETag = "ETag"
|
|
|
|
ContentType = "Content-Type"
|
|
|
|
ContentMD5 = "Content-Md5"
|
|
|
|
ContentEncoding = "Content-Encoding"
|
|
|
|
Expires = "Expires"
|
|
|
|
ContentLength = "Content-Length"
|
|
|
|
ContentLanguage = "Content-Language"
|
|
|
|
ContentRange = "Content-Range"
|
|
|
|
Connection = "Connection"
|
|
|
|
AcceptRanges = "Accept-Ranges"
|
|
|
|
AmzBucketRegion = "X-Amz-Bucket-Region"
|
|
|
|
ServerInfo = "Server"
|
|
|
|
RetryAfter = "Retry-After"
|
|
|
|
Location = "Location"
|
|
|
|
CacheControl = "Cache-Control"
|
|
|
|
ContentDisposition = "Content-Disposition"
|
|
|
|
Authorization = "Authorization"
|
|
|
|
Action = "Action"
|
2020-07-08 20:36:56 -04:00
|
|
|
Range = "Range"
|
2019-07-03 01:34:32 -04:00
|
|
|
)
|
|
|
|
|
2020-01-10 23:21:13 -05:00
|
|
|
// Non standard S3 HTTP response constants
|
|
|
|
const (
|
|
|
|
XCache = "X-Cache"
|
|
|
|
XCacheLookup = "X-Cache-Lookup"
|
|
|
|
)
|
|
|
|
|
2019-07-03 01:34:32 -04:00
|
|
|
// Standard S3 HTTP request constants
|
|
|
|
const (
|
|
|
|
IfModifiedSince = "If-Modified-Since"
|
|
|
|
IfUnmodifiedSince = "If-Unmodified-Since"
|
|
|
|
IfMatch = "If-Match"
|
|
|
|
IfNoneMatch = "If-None-Match"
|
|
|
|
|
2019-10-07 01:50:24 -04:00
|
|
|
// S3 storage class
|
|
|
|
AmzStorageClass = "x-amz-storage-class"
|
|
|
|
|
2020-06-12 23:04:01 -04:00
|
|
|
// S3 object version ID
|
|
|
|
AmzVersionID = "x-amz-version-id"
|
|
|
|
AmzDeleteMarker = "x-amz-delete-marker"
|
|
|
|
|
2020-01-20 11:45:59 -05:00
|
|
|
// S3 object tagging
|
|
|
|
AmzObjectTagging = "X-Amz-Tagging"
|
2020-05-25 19:51:32 -04:00
|
|
|
AmzTagCount = "x-amz-tagging-count"
|
2020-01-20 11:45:59 -05:00
|
|
|
AmzTagDirective = "X-Amz-Tagging-Directive"
|
|
|
|
|
2020-11-12 15:12:09 -05:00
|
|
|
// S3 transition restore
|
|
|
|
AmzRestore = "x-amz-restore"
|
|
|
|
AmzRestoreExpiryDays = "X-Amz-Restore-Expiry-Days"
|
|
|
|
AmzRestoreRequestDate = "X-Amz-Restore-Request-Date"
|
|
|
|
AmzRestoreOutputPath = "x-amz-restore-output-path"
|
|
|
|
|
2019-07-03 01:34:32 -04:00
|
|
|
// S3 extensions
|
|
|
|
AmzCopySourceIfModifiedSince = "x-amz-copy-source-if-modified-since"
|
|
|
|
AmzCopySourceIfUnmodifiedSince = "x-amz-copy-source-if-unmodified-since"
|
|
|
|
|
|
|
|
AmzCopySourceIfNoneMatch = "x-amz-copy-source-if-none-match"
|
|
|
|
AmzCopySourceIfMatch = "x-amz-copy-source-if-match"
|
|
|
|
|
2019-11-20 16:18:09 -05:00
|
|
|
AmzCopySource = "X-Amz-Copy-Source"
|
|
|
|
AmzCopySourceVersionID = "X-Amz-Copy-Source-Version-Id"
|
|
|
|
AmzCopySourceRange = "X-Amz-Copy-Source-Range"
|
|
|
|
AmzMetadataDirective = "X-Amz-Metadata-Directive"
|
|
|
|
AmzObjectLockMode = "X-Amz-Object-Lock-Mode"
|
|
|
|
AmzObjectLockRetainUntilDate = "X-Amz-Object-Lock-Retain-Until-Date"
|
|
|
|
AmzObjectLockLegalHold = "X-Amz-Object-Lock-Legal-Hold"
|
|
|
|
AmzObjectLockBypassGovernance = "X-Amz-Bypass-Governance-Retention"
|
2020-07-21 20:49:56 -04:00
|
|
|
AmzBucketReplicationStatus = "X-Amz-Replication-Status"
|
2020-03-12 15:37:27 -04:00
|
|
|
// Multipart parts count
|
|
|
|
AmzMpPartsCount = "x-amz-mp-parts-count"
|
|
|
|
|
2020-05-21 17:12:52 -04:00
|
|
|
// Object date/time of expiration
|
|
|
|
AmzExpiration = "x-amz-expiration"
|
|
|
|
|
2020-02-16 01:07:52 -05:00
|
|
|
// Dummy putBucketACL
|
|
|
|
AmzACL = "x-amz-acl"
|
|
|
|
|
2019-07-03 01:34:32 -04:00
|
|
|
// Signature V4 related contants.
|
|
|
|
AmzContentSha256 = "X-Amz-Content-Sha256"
|
|
|
|
AmzDate = "X-Amz-Date"
|
|
|
|
AmzAlgorithm = "X-Amz-Algorithm"
|
|
|
|
AmzExpires = "X-Amz-Expires"
|
|
|
|
AmzSignedHeaders = "X-Amz-SignedHeaders"
|
|
|
|
AmzSignature = "X-Amz-Signature"
|
|
|
|
AmzCredential = "X-Amz-Credential"
|
|
|
|
AmzSecurityToken = "X-Amz-Security-Token"
|
|
|
|
AmzDecodedContentLength = "X-Amz-Decoded-Content-Length"
|
|
|
|
|
2020-08-11 11:29:29 -04:00
|
|
|
AmzMetaUnencryptedContentLength = "X-Amz-Meta-X-Amz-Unencrypted-Content-Length"
|
|
|
|
AmzMetaUnencryptedContentMD5 = "X-Amz-Meta-X-Amz-Unencrypted-Content-Md5"
|
|
|
|
|
2020-12-22 12:19:32 -05:00
|
|
|
// AWS server-side encryption headers for SSE-S3, SSE-KMS and SSE-C.
|
|
|
|
AmzServerSideEncryption = "X-Amz-Server-Side-Encryption"
|
|
|
|
AmzServerSideEncryptionKmsID = AmzServerSideEncryption + "-Aws-Kms-Key-Id"
|
|
|
|
AmzServerSideEncryptionKmsContext = AmzServerSideEncryption + "-Context"
|
|
|
|
AmzServerSideEncryptionCustomerAlgorithm = AmzServerSideEncryption + "-Customer-Algorithm"
|
|
|
|
AmzServerSideEncryptionCustomerKey = AmzServerSideEncryption + "-Customer-Key"
|
|
|
|
AmzServerSideEncryptionCustomerKeyMD5 = AmzServerSideEncryption + "-Customer-Key-Md5"
|
|
|
|
AmzServerSideEncryptionCopyCustomerAlgorithm = "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm"
|
|
|
|
AmzServerSideEncryptionCopyCustomerKey = "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key"
|
|
|
|
AmzServerSideEncryptionCopyCustomerKeyMD5 = "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5"
|
|
|
|
|
|
|
|
AmzEncryptionAES = "AES256"
|
|
|
|
AmzEncryptionKMS = "aws:kms"
|
|
|
|
|
2019-07-03 01:34:32 -04:00
|
|
|
// Signature v2 related constants
|
|
|
|
AmzSignatureV2 = "Signature"
|
|
|
|
AmzAccessKeyID = "AWSAccessKeyId"
|
|
|
|
|
|
|
|
// Response request id.
|
|
|
|
AmzRequestID = "x-amz-request-id"
|
|
|
|
|
|
|
|
// Deployment id.
|
|
|
|
MinioDeploymentID = "x-minio-deployment-id"
|
2019-09-05 05:20:56 -04:00
|
|
|
|
|
|
|
// Server-Status
|
|
|
|
MinIOServerStatus = "x-minio-server-status"
|
2020-04-06 20:51:05 -04:00
|
|
|
|
2020-07-08 20:36:56 -04:00
|
|
|
// Delete special flag to force delete a bucket
|
2020-04-06 20:51:05 -04:00
|
|
|
MinIOForceDelete = "x-minio-force-delete"
|
2020-07-08 20:36:56 -04:00
|
|
|
|
|
|
|
// Header indicates if the mtime should be preserved by client
|
|
|
|
MinIOSourceMTime = "x-minio-source-mtime"
|
2020-08-12 20:32:24 -04:00
|
|
|
|
|
|
|
// Header indicates if the etag should be preserved by client
|
|
|
|
MinIOSourceETag = "x-minio-source-etag"
|
2020-10-30 15:20:28 -04:00
|
|
|
|
|
|
|
// Writes expected write quorum
|
|
|
|
MinIOWriteQuorum = "x-minio-write-quorum"
|
|
|
|
|
|
|
|
// Reports number of drives currently healing
|
|
|
|
MinIOHealingDrives = "x-minio-healing-drives"
|
2020-11-19 21:43:58 -05:00
|
|
|
|
|
|
|
// Header indicates if the delete marker should be preserved by client
|
|
|
|
MinIOSourceDeleteMarker = "x-minio-source-deletemarker"
|
|
|
|
|
|
|
|
// Header indicates if the delete marker version needs to be purged.
|
|
|
|
MinIOSourceDeleteMarkerDelete = "x-minio-source-deletemarker-delete"
|
2020-11-22 02:48:50 -05:00
|
|
|
|
|
|
|
// Header indicates permanent delete replication status.
|
|
|
|
MinIODeleteReplicationStatus = "X-Minio-Replication-Delete-Status"
|
|
|
|
// Header indicates delete-marker replication status.
|
|
|
|
MinIODeleteMarkerReplicationStatus = "X-Minio-Replication-DeleteMarker-Status"
|
2021-01-12 01:36:51 -05:00
|
|
|
// Header indicates if its a GET/HEAD proxy request for active-active replication
|
|
|
|
MinIOSourceProxyRequest = "x-minio-source-proxy-request"
|
2020-07-08 20:36:56 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
// Common http query params S3 API
|
|
|
|
const (
|
|
|
|
VersionID = "versionId"
|
|
|
|
|
|
|
|
PartNumber = "partNumber"
|
|
|
|
|
|
|
|
UploadID = "uploadId"
|
2019-07-03 01:34:32 -04:00
|
|
|
)
|