Use QuicTextUtils::HexDecode() in HttpDecoderTests.

Using the syntax std::string("\x02\x02") for strings non containing 0-bytes and
std::string("\x00\x00", 2) for strings containing 0-byte has pitfalls: it has
happened to me too many times that I added a 0-byte but forgot to add the
explicit length argument, or changed the length of the string but forgot to
update the length argument, and wasted time investigating why the results are
not what I expected.  HexDecode() should eliminate this difficulty entirely.

This happened most recently while working on https://crbug.com/1001823, but with
all the activity around PRIORITY frame I expect we'll spend more time adding
HttpDecoderTests in the future.

gfe-relnote: n/a, test-only change.
PiperOrigin-RevId: 270248919
Change-Id: I8675befae7e8c22ae26871ff2ed9df6ac686c31d
1 file changed
tree: 932c425ba7a854f878fb34fe884303a7019b7d6a
  1. common/
  2. epoll_server/
  3. http2/
  4. quic/
  5. spdy/
  6. CONTRIBUTING.md
  7. LICENSE
  8. README.md
README.md

QUICHE

QUICHE (QUIC, Http/2, Etc) is Google‘s implementation of QUIC and related protocols. It powers Chromium as well as Google’s QUIC servers and some other projects.

The code is currently in process of being moved from https://cs.chromium.org/chromium/src/net/third_party/ into this repository. Please excuse our appearance while we're under construction.