(b []byte)
| 80 | ) |
| 81 | |
| 82 | func httpHostHeaderFromBytes(b []byte) string { |
| 83 | if i := bytes.Index(b, lfHostColon); i != -1 { |
| 84 | return string(bytes.TrimSpace(untilEOL(b[i+len(lfHostColon):]))) |
| 85 | } |
| 86 | if i := bytes.Index(b, lfhostColon); i != -1 { |
| 87 | return string(bytes.TrimSpace(untilEOL(b[i+len(lfhostColon):]))) |
| 88 | } |
| 89 | return "" |
| 90 | } |
| 91 | |
| 92 | // untilEOL returns v, truncated before the first '\n' byte, if any. |
| 93 | // The returned slice may include a '\r' at the end. |
no test coverage detected