Annotate to ignore a line with forced first 5 symbols

This commit is contained in:
Yaroslav Halchenko 2025-03-04 15:56:37 -05:00
parent 8b02800742
commit 430910e0a1

View File

@ -162,7 +162,7 @@ func (c *httpRedirectConn) Read(p []byte) (int, error) {
// looks like it might've been a misdirected plaintext HTTP request.
func firstBytesLookLikeHTTP(hdr []byte) bool {
switch string(hdr[:5]) {
case "GET /", "HEAD ", "POST ", "PUT /", "OPTIO":
case "GET /", "HEAD ", "POST ", "PUT /", "OPTIO": // codespell:ignore
return true
}
return false