From c1aee8c825c2179ad4959ebf533bf27c4b774d00 Mon Sep 17 00:00:00 2001 From: Todd Neal Date: Tue, 25 Aug 2015 18:44:30 -0500 Subject: [PATCH] net/http: remove always true comparison byte is unsigned so the comparison against zero is always true. Change-Id: I8fa60245972be362ae920507a291f92c0f9831ad Reviewed-on: https://go-review.googlesource.com/13941 Run-TryBot: Todd Neal TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/net/http/sniff.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/http/sniff.go b/src/net/http/sniff.go index 3be8c865d3..3602969031 100644 --- a/src/net/http/sniff.go +++ b/src/net/http/sniff.go @@ -209,7 +209,7 @@ func (textSig) match(data []byte, firstNonWS int) string { // c.f. section 5, step 4. for _, b := range data[firstNonWS:] { switch { - case 0x00 <= b && b <= 0x08, + case b <= 0x08, b == 0x0B, 0x0E <= b && b <= 0x1A, 0x1C <= b && b <= 0x1F: -- 2.48.1