From cb05fe9cd9141d072dec3edaaeef27039e68d81e Mon Sep 17 00:00:00 2001 From: Joanna Jo Date: Wed, 22 Jan 2025 14:45:41 -0800 Subject: [PATCH] Enable strict validation on HTTP1xCodec for HTTPDownstreamSession tests Summary: Default to strict validation on HTTP1xCodec for HTTPDownstreamSession unit tests. Reviewed By: afrind Differential Revision: D68506175 fbshipit-source-id: ee7e22b97442620309b2f7e8a1213f1260a4e300 --- proxygen/lib/http/session/test/HTTPDownstreamSessionTest.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proxygen/lib/http/session/test/HTTPDownstreamSessionTest.cpp b/proxygen/lib/http/session/test/HTTPDownstreamSessionTest.cpp index e75ba972b5..9cb12581bd 100644 --- a/proxygen/lib/http/session/test/HTTPDownstreamSessionTest.cpp +++ b/proxygen/lib/http/session/test/HTTPDownstreamSessionTest.cpp @@ -66,6 +66,9 @@ class HTTPDownstreamTest : public testing::Test { HTTPTransaction::setEgressBufferLimit(65536); auto codec = makeServerCodec(C::version); rawCodec_ = codec.get(); + if (dynamic_cast(rawCodec_) != nullptr) { + dynamic_cast(rawCodec_)->setStrictValidation(true); + } // If the codec is H2, getHeaderIndexingStrategy will be called when setting // up the codec