http2/hpack: remove hpack's constant time string comparison

Delete the constant time string comparison. It's slow and shows up in
profiles, nobody else does it, and the spec text no longer recommends
doing it. See bug for discussion and details.

Also clean up some naked returns while I'm here (noted during review).

Fixes golang/go#19238

Change-Id: I344c5766c5d97bbcf01eab0624097941591ce00f
Run-TryBot: Brad Fitzpatrick <>
TryBot-Result: Gobot Gobot <>
Reviewed-by: Tom Bergan <>
2 files changed