diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2021-05-26 09:09:34 +0200 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2021-05-26 09:09:50 +0200 |
commit | 5bb5cfc9ca3db7caf1917ca0c8431e70cafa87cb (patch) | |
tree | dbd7a772003548c760484559a1b48a59a2ed2ee7 /header.go | |
parent | Add Request.TLS and try to avoid a new alloc if Request.Header is already all... (diff) | |
download | fasthttp-5bb5cfc9ca3db7caf1917ca0c8431e70cafa87cb.tar.gz fasthttp-5bb5cfc9ca3db7caf1917ca0c8431e70cafa87cb.tar.bz2 fasthttp-5bb5cfc9ca3db7caf1917ca0c8431e70cafa87cb.zip |
Remove unused peekRawHeader
Diffstat (limited to 'header.go')
-rw-r--r-- | header.go | 31 |
1 files changed, 0 insertions, 31 deletions
@@ -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 { |