aboutsummaryrefslogtreecommitdiff
path: root/header.go
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2021-05-26 09:09:34 +0200
committerGravatar Erik Dubbelboer <erik@dubbelboer.com> 2021-05-26 09:09:50 +0200
commit5bb5cfc9ca3db7caf1917ca0c8431e70cafa87cb (patch)
treedbd7a772003548c760484559a1b48a59a2ed2ee7 /header.go
parentAdd Request.TLS and try to avoid a new alloc if Request.Header is already all... (diff)
downloadfasthttp-5bb5cfc9ca3db7caf1917ca0c8431e70cafa87cb.tar.gz
fasthttp-5bb5cfc9ca3db7caf1917ca0c8431e70cafa87cb.tar.bz2
fasthttp-5bb5cfc9ca3db7caf1917ca0c8431e70cafa87cb.zip
Remove unused peekRawHeader
Diffstat (limited to 'header.go')
-rw-r--r--header.go31
1 files changed, 0 insertions, 31 deletions
diff --git a/header.go b/header.go
index 7c9cc32..2680de5 100644
--- a/header.go
+++ b/header.go
@@ -1804,37 +1804,6 @@ func (h *RequestHeader) parseFirstLine(buf []byte) (int, error) {
return len(buf) - len(bNext), nil
}
-func peekRawHeader(buf, key []byte) []byte {
- n := bytes.Index(buf, key)
- if n < 0 {
- return nil
- }
- if n > 0 && buf[n-1] != nChar {
- return nil
- }
- n += len(key)
- if n >= len(buf) {
- return nil
- }
- if buf[n] != ':' {
- return nil
- }
- n++
- if buf[n] != ' ' {
- return nil
- }
- n++
- buf = buf[n:]
- n = bytes.IndexByte(buf, nChar)
- if n < 0 {
- return nil
- }
- if n > 0 && buf[n-1] == rChar {
- n--
- }
- return buf[:n]
-}
-
func readRawHeaders(dst, buf []byte) ([]byte, int, error) {
n := bytes.IndexByte(buf, nChar)
if n < 0 {