storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/cmd/http/headers.go (about)

     1  /*
     2   * MinIO Cloud Storage, (C) 2019 MinIO, Inc.
     3   *
     4   * Licensed under the Apache License, Version 2.0 (the "License");
     5   * you may not use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *     http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16  
    17  package http
    18  
    19  // Standard S3 HTTP response constants
    20  const (
    21  	LastModified       = "Last-Modified"
    22  	Date               = "Date"
    23  	ETag               = "ETag"
    24  	ContentType        = "Content-Type"
    25  	ContentMD5         = "Content-Md5"
    26  	ContentEncoding    = "Content-Encoding"
    27  	Expires            = "Expires"
    28  	ContentLength      = "Content-Length"
    29  	ContentLanguage    = "Content-Language"
    30  	ContentRange       = "Content-Range"
    31  	Connection         = "Connection"
    32  	AcceptRanges       = "Accept-Ranges"
    33  	AmzBucketRegion    = "X-Amz-Bucket-Region"
    34  	ServerInfo         = "Server"
    35  	RetryAfter         = "Retry-After"
    36  	Location           = "Location"
    37  	CacheControl       = "Cache-Control"
    38  	ContentDisposition = "Content-Disposition"
    39  	Authorization      = "Authorization"
    40  	Action             = "Action"
    41  	Range              = "Range"
    42  )
    43  
    44  // Non standard S3 HTTP response constants
    45  const (
    46  	XCache       = "X-Cache"
    47  	XCacheLookup = "X-Cache-Lookup"
    48  )
    49  
    50  // Standard S3 HTTP request constants
    51  const (
    52  	IfModifiedSince   = "If-Modified-Since"
    53  	IfUnmodifiedSince = "If-Unmodified-Since"
    54  	IfMatch           = "If-Match"
    55  	IfNoneMatch       = "If-None-Match"
    56  
    57  	// S3 storage class
    58  	AmzStorageClass = "x-amz-storage-class"
    59  
    60  	// S3 object version ID
    61  	AmzVersionID    = "x-amz-version-id"
    62  	AmzDeleteMarker = "x-amz-delete-marker"
    63  
    64  	// S3 object tagging
    65  	AmzObjectTagging = "X-Amz-Tagging"
    66  	AmzTagCount      = "x-amz-tagging-count"
    67  	AmzTagDirective  = "X-Amz-Tagging-Directive"
    68  
    69  	// S3 transition restore
    70  	AmzRestore            = "x-amz-restore"
    71  	AmzRestoreExpiryDays  = "X-Amz-Restore-Expiry-Days"
    72  	AmzRestoreRequestDate = "X-Amz-Restore-Request-Date"
    73  	AmzRestoreOutputPath  = "x-amz-restore-output-path"
    74  
    75  	// S3 extensions
    76  	AmzCopySourceIfModifiedSince   = "x-amz-copy-source-if-modified-since"
    77  	AmzCopySourceIfUnmodifiedSince = "x-amz-copy-source-if-unmodified-since"
    78  
    79  	AmzCopySourceIfNoneMatch = "x-amz-copy-source-if-none-match"
    80  	AmzCopySourceIfMatch     = "x-amz-copy-source-if-match"
    81  
    82  	AmzCopySource                 = "X-Amz-Copy-Source"
    83  	AmzCopySourceVersionID        = "X-Amz-Copy-Source-Version-Id"
    84  	AmzCopySourceRange            = "X-Amz-Copy-Source-Range"
    85  	AmzMetadataDirective          = "X-Amz-Metadata-Directive"
    86  	AmzObjectLockMode             = "X-Amz-Object-Lock-Mode"
    87  	AmzObjectLockRetainUntilDate  = "X-Amz-Object-Lock-Retain-Until-Date"
    88  	AmzObjectLockLegalHold        = "X-Amz-Object-Lock-Legal-Hold"
    89  	AmzObjectLockBypassGovernance = "X-Amz-Bypass-Governance-Retention"
    90  	AmzBucketReplicationStatus    = "X-Amz-Replication-Status"
    91  	AmzSnowballExtract            = "X-Amz-Meta-Snowball-Auto-Extract"
    92  
    93  	// Multipart parts count
    94  	AmzMpPartsCount = "x-amz-mp-parts-count"
    95  
    96  	// Object date/time of expiration
    97  	AmzExpiration = "x-amz-expiration"
    98  
    99  	// Dummy putBucketACL
   100  	AmzACL = "x-amz-acl"
   101  
   102  	// Signature V4 related contants.
   103  	AmzContentSha256        = "X-Amz-Content-Sha256"
   104  	AmzDate                 = "X-Amz-Date"
   105  	AmzAlgorithm            = "X-Amz-Algorithm"
   106  	AmzExpires              = "X-Amz-Expires"
   107  	AmzSignedHeaders        = "X-Amz-SignedHeaders"
   108  	AmzSignature            = "X-Amz-Signature"
   109  	AmzCredential           = "X-Amz-Credential"
   110  	AmzSecurityToken        = "X-Amz-Security-Token"
   111  	AmzDecodedContentLength = "X-Amz-Decoded-Content-Length"
   112  
   113  	AmzMetaUnencryptedContentLength = "X-Amz-Meta-X-Amz-Unencrypted-Content-Length"
   114  	AmzMetaUnencryptedContentMD5    = "X-Amz-Meta-X-Amz-Unencrypted-Content-Md5"
   115  
   116  	// AWS server-side encryption headers for SSE-S3, SSE-KMS and SSE-C.
   117  	AmzServerSideEncryption                      = "X-Amz-Server-Side-Encryption"
   118  	AmzServerSideEncryptionKmsID                 = AmzServerSideEncryption + "-Aws-Kms-Key-Id"
   119  	AmzServerSideEncryptionKmsContext            = AmzServerSideEncryption + "-Context"
   120  	AmzServerSideEncryptionCustomerAlgorithm     = AmzServerSideEncryption + "-Customer-Algorithm"
   121  	AmzServerSideEncryptionCustomerKey           = AmzServerSideEncryption + "-Customer-Key"
   122  	AmzServerSideEncryptionCustomerKeyMD5        = AmzServerSideEncryption + "-Customer-Key-Md5"
   123  	AmzServerSideEncryptionCopyCustomerAlgorithm = "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm"
   124  	AmzServerSideEncryptionCopyCustomerKey       = "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key"
   125  	AmzServerSideEncryptionCopyCustomerKeyMD5    = "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5"
   126  
   127  	AmzEncryptionAES = "AES256"
   128  	AmzEncryptionKMS = "aws:kms"
   129  
   130  	// Signature v2 related constants
   131  	AmzSignatureV2 = "Signature"
   132  	AmzAccessKeyID = "AWSAccessKeyId"
   133  
   134  	// Response request id.
   135  	AmzRequestID = "x-amz-request-id"
   136  
   137  	// Deployment id.
   138  	MinioDeploymentID = "x-minio-deployment-id"
   139  
   140  	// Server-Status
   141  	MinIOServerStatus = "x-minio-server-status"
   142  
   143  	// Delete special flag to force delete a bucket
   144  	MinIOForceDelete = "x-minio-force-delete"
   145  
   146  	// Header indicates if the mtime should be preserved by client
   147  	MinIOSourceMTime = "x-minio-source-mtime"
   148  
   149  	// Header indicates if the etag should be preserved by client
   150  	MinIOSourceETag = "x-minio-source-etag"
   151  
   152  	// Writes expected write quorum
   153  	MinIOWriteQuorum = "x-minio-write-quorum"
   154  
   155  	// Reports number of drives currently healing
   156  	MinIOHealingDrives = "x-minio-healing-drives"
   157  
   158  	// Header indicates if the delete marker should be preserved by client
   159  	MinIOSourceDeleteMarker = "x-minio-source-deletemarker"
   160  
   161  	// Header indicates if the delete marker version needs to be purged.
   162  	MinIOSourceDeleteMarkerDelete = "x-minio-source-deletemarker-delete"
   163  
   164  	// Header indicates permanent delete replication status.
   165  	MinIODeleteReplicationStatus = "X-Minio-Replication-Delete-Status"
   166  	// Header indicates delete-marker replication status.
   167  	MinIODeleteMarkerReplicationStatus = "X-Minio-Replication-DeleteMarker-Status"
   168  	// Header indicates if its a GET/HEAD proxy request for active-active replication
   169  	MinIOSourceProxyRequest = "X-Minio-Source-Proxy-Request"
   170  	// Header indicates that this request is a replication request to create a REPLICA
   171  	MinIOSourceReplicationRequest = "X-Minio-Source-Replication-Request"
   172  )
   173  
   174  // Common http query params S3 API
   175  const (
   176  	VersionID = "versionId"
   177  
   178  	PartNumber = "partNumber"
   179  
   180  	UploadID = "uploadId"
   181  )