62 sessionCreationErrors_++;
71 public ::testing::TestWithParam<const char*> {
75 sslCtxConfig_.setCertificate(
76 kTestDir +
"test_cert1.pem",
77 kTestDir +
"test_cert1.key",
80 sslCtxConfig_.isDefault =
true;
81 config_->sslContextConfigs.emplace_back(sslCtxConfig_);
85 config_ = std::make_unique<AcceptorConfiguration>();
93 acceptor_ = std::make_unique<HTTPTargetSessionAcceptor>(*config_);
95 acceptor_->init(&mockServerSocket_, &eventBase_);
99 std::unique_ptr<AcceptorConfiguration>
config_;
118 }
else if (proto.find(
"h2") != std::string::npos) {
124 auto ctx = std::make_shared<folly::SSLContext>();
125 AsyncSSLSocket::UniquePtr sock(
new AsyncSSLSocket(ctx, &eventBase_));
132 SecureTransportType::TLS,
138 char const*
protos1[] = {
"h2-14",
"h2",
"spdy/3.1",
"spdy/3",
142 ::testing::ValuesIn(protos1));
147 config_->plaintextProtocol = proto;
149 if (proto ==
"h2c") {
154 AsyncSocket::UniquePtr sock(
new AsyncSocket(&eventBase_));
170 ::testing::ValuesIn(protos2));
193 AsyncSocket::UniquePtr sock(
new AsyncSocket(&eventBase_));
void connectionReady(folly::AsyncTransportWrapper::UniquePtr sock, const folly::SocketAddress &clientAddr, const std::string &nextProtocolName, SecureTransportType secureTransportType, TransportInfo &tinfo)
void onSessionCreationError(ProxygenError) override
void onCreate(const HTTPSessionBase &session) override
#define EXPECT_EQ(val1, val2)
constexpr detail::Map< Move > move
std::unique_ptr< AcceptorConfiguration > config_
HTTPTargetSessionAcceptor(const AcceptorConfiguration &accConfig)
void connectionReady(AsyncSocket::UniquePtr sock, const SocketAddress &clientAddr, const std::string &nextProtocolName, SecureTransportType secureTransportType, wangle::TransportInfo &tinfo)
requires E e noexcept(noexcept(s.error(std::move(e))))
FizzServerAcceptor * acceptor_
HTTPTransaction::Handler * newHandler(HTTPTransaction &, HTTPMessage *) noexceptoverride
const std::string & getCodecProtocolString(CodecProtocol proto)
virtual CodecProtocol getCodecProtocol() const
folly::EventBase eventBase_
std::string expectedProto_
folly::StringPiece getContainingDirectory(folly::StringPiece input)
wangle::SSLContextConfig sslCtxConfig_
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
TEST_F(HeaderTableTests, IndexTranslation)
***std::atomic< Config * > config_
INSTANTIATE_TEST_CASE_P(ValueTest, RFC1867CR,::testing::Values(string("zyx\r\nwvu", 8), string("\rzyxwvut", 8), string("zyxwvut\r", 8), string("\nzyxwvut", 8), string("zyxwvut\n", 8), string("\r\n\r\n\r\n\r\n", 8), string("\r\r\r\r\r\r\r\r", 8)))
std::unique_ptr< HTTPTargetSessionAcceptor > acceptor_
folly::test::MockAsyncServerSocket mockServerSocket_