diff options
| author | Rutger Broekhoff | 2024-01-02 18:56:31 +0100 |
|---|---|---|
| committer | Rutger Broekhoff | 2024-01-02 18:56:31 +0100 |
| commit | 8db41da676ac8368ef7c2549d56239a5ff5eedde (patch) | |
| tree | 09c427fd66de2ec1ebffc8342f5fdbb84b0701b5 /vendor/golang.org/x/net/http/httpguts/guts.go | |
| parent | d4f75fb6db22e57577867445a022227e70958931 (diff) | |
| download | gitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.tar.gz gitolfs3-8db41da676ac8368ef7c2549d56239a5ff5eedde.zip | |
Delete vendor directory
Diffstat (limited to 'vendor/golang.org/x/net/http/httpguts/guts.go')
| -rw-r--r-- | vendor/golang.org/x/net/http/httpguts/guts.go | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/vendor/golang.org/x/net/http/httpguts/guts.go b/vendor/golang.org/x/net/http/httpguts/guts.go deleted file mode 100644 index e6cd0ce..0000000 --- a/vendor/golang.org/x/net/http/httpguts/guts.go +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | // Copyright 2018 The Go Authors. All rights reserved. | ||
| 2 | // Use of this source code is governed by a BSD-style | ||
| 3 | // license that can be found in the LICENSE file. | ||
| 4 | |||
| 5 | // Package httpguts provides functions implementing various details | ||
| 6 | // of the HTTP specification. | ||
| 7 | // | ||
| 8 | // This package is shared by the standard library (which vendors it) | ||
| 9 | // and x/net/http2. It comes with no API stability promise. | ||
| 10 | package httpguts | ||
| 11 | |||
| 12 | import ( | ||
| 13 | "net/textproto" | ||
| 14 | "strings" | ||
| 15 | ) | ||
| 16 | |||
| 17 | // ValidTrailerHeader reports whether name is a valid header field name to appear | ||
| 18 | // in trailers. | ||
| 19 | // See RFC 7230, Section 4.1.2 | ||
| 20 | func ValidTrailerHeader(name string) bool { | ||
| 21 | name = textproto.CanonicalMIMEHeaderKey(name) | ||
| 22 | if strings.HasPrefix(name, "If-") || badTrailer[name] { | ||
| 23 | return false | ||
| 24 | } | ||
| 25 | return true | ||
| 26 | } | ||
| 27 | |||
| 28 | var badTrailer = map[string]bool{ | ||
| 29 | "Authorization": true, | ||
| 30 | "Cache-Control": true, | ||
| 31 | "Connection": true, | ||
| 32 | "Content-Encoding": true, | ||
| 33 | "Content-Length": true, | ||
| 34 | "Content-Range": true, | ||
| 35 | "Content-Type": true, | ||
| 36 | "Expect": true, | ||
| 37 | "Host": true, | ||
| 38 | "Keep-Alive": true, | ||
| 39 | "Max-Forwards": true, | ||
| 40 | "Pragma": true, | ||
| 41 | "Proxy-Authenticate": true, | ||
| 42 | "Proxy-Authorization": true, | ||
| 43 | "Proxy-Connection": true, | ||
| 44 | "Range": true, | ||
| 45 | "Realm": true, | ||
| 46 | "Te": true, | ||
| 47 | "Trailer": true, | ||
| 48 | "Transfer-Encoding": true, | ||
| 49 | "Www-Authenticate": true, | ||
| 50 | } | ||