github.com/cs3org/reva/v2@v2.27.7/internal/http/services/owncloud/ocdav/net/headers.go (about) 1 // Copyright 2018-2022 CERN 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 // 15 // In applying this license, CERN does not waive the privileges and immunities 16 // granted to it by virtue of its status as an Intergovernmental Organization 17 // or submit itself to any jurisdiction. 18 19 package net 20 21 // Common HTTP headers. 22 const ( 23 HeaderAcceptRanges = "Accept-Ranges" 24 HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers" 25 HeaderAccessControlExposeHeaders = "Access-Control-Expose-Headers" 26 HeaderContentDisposistion = "Content-Disposition" 27 HeaderContentEncoding = "Content-Encoding" 28 HeaderContentLength = "Content-Length" 29 HeaderContentRange = "Content-Range" 30 HeaderContentType = "Content-Type" 31 HeaderETag = "ETag" 32 HeaderLastModified = "Last-Modified" 33 HeaderLocation = "Location" 34 HeaderRange = "Range" 35 HeaderIfMatch = "If-Match" 36 HeaderIfNoneMatch = "If-None-Match" 37 HeaderPrefer = "Prefer" 38 HeaderPreferenceApplied = "Preference-Applied" 39 HeaderVary = "Vary" 40 ) 41 42 // webdav headers 43 const ( 44 HeaderDav = "DAV" // https://datatracker.ietf.org/doc/html/rfc4918#section-10.1 45 HeaderDepth = "Depth" // https://datatracker.ietf.org/doc/html/rfc4918#section-10.2 46 HeaderDestination = "Destination" // https://datatracker.ietf.org/doc/html/rfc4918#section-10.3 47 HeaderIf = "If" // https://datatracker.ietf.org/doc/html/rfc4918#section-10.4 48 HeaderLockToken = "Lock-Token" // https://datatracker.ietf.org/doc/html/rfc4918#section-10.5 49 HeaderOverwrite = "Overwrite" // https://datatracker.ietf.org/doc/html/rfc4918#section-10.6 50 HeaderTimeout = "Timeout" // https://datatracker.ietf.org/doc/html/rfc4918#section-10.7 51 ) 52 53 // Non standard HTTP headers. 54 const ( 55 HeaderOCFileID = "OC-FileId" 56 HeaderOCETag = "OC-ETag" 57 HeaderOCChecksum = "OC-Checksum" 58 HeaderOCPermissions = "OC-Perm" 59 HeaderTusResumable = "Tus-Resumable" 60 HeaderTusVersion = "Tus-Version" 61 HeaderTusExtension = "Tus-Extension" 62 HeaderTusChecksumAlgorithm = "Tus-Checksum-Algorithm" 63 HeaderTusUploadExpires = "Upload-Expires" 64 HeaderUploadChecksum = "Upload-Checksum" 65 HeaderUploadLength = "Upload-Length" 66 HeaderUploadMetadata = "Upload-Metadata" 67 HeaderUploadOffset = "Upload-Offset" 68 HeaderOCMtime = "X-OC-Mtime" 69 HeaderExpectedEntityLength = "X-Expected-Entity-Length" 70 HeaderLitmus = "X-Litmus" 71 HeaderTransferAuth = "TransferHeaderAuthorization" 72 ) 73 74 // HTTP Prefer header values 75 const ( 76 HeaderPreferReturn = "return" // eg. return=representation / return=minimal, depth-noroot 77 )