proxygen
|
#include <proxygen/lib/http/codec/test/HTTPParallelCodecTest.h>
#include <proxygen/lib/http/codec/test/MockHTTPCodec.h>
#include <folly/io/Cursor.h>
#include <proxygen/lib/http/codec/HTTP2Codec.h>
#include <proxygen/lib/http/codec/test/HTTP2FramerTest.h>
#include <proxygen/lib/http/HTTPHeaderSize.h>
#include <proxygen/lib/http/HTTPMessage.h>
#include <folly/portability/GTest.h>
#include <folly/portability/GMock.h>
#include <random>
Go to the source code of this file.
Classes | |
class | HTTP2CodecTest |
class | DummyQueue |
Functions | |
TEST (HTTP2CodecConstantsTest, HTTPContantsAreCommonHeaders) | |
TEST_F (HTTP2CodecTest, IgnoreUnknownSettings) | |
TEST_F (HTTP2CodecTest, NoExHeaders) | |
TEST_F (HTTP2CodecTest, IgnoreExHeadersSetting) | |
TEST_F (HTTP2CodecTest, EnableExHeadersSetting) | |
TEST_F (HTTP2CodecTest, InvalidExHeadersSetting) | |
TEST_F (HTTP2CodecTest, BasicHeader) | |
TEST_F (HTTP2CodecTest, RequestFromServer) | |
TEST_F (HTTP2CodecTest, ResponseFromClient) | |
TEST_F (HTTP2CodecTest, ExHeadersWithPriority) | |
TEST_F (HTTP2CodecTest, IgnoreExHeadersIfNotEnabled) | |
TEST_F (HTTP2CodecTest, BadHeaders) | |
TEST_F (HTTP2CodecTest, BadPseudoHeaders) | |
TEST_F (HTTP2CodecTest, BadHeaderValues) | |
TEST_F (HTTP2CodecTest, EmptyHeaderName) | |
TEST_F (HTTP2CodecTest, BasicConnect) | |
TEST_F (HTTP2CodecTest, BadConnect) | |
TEST_F (HTTP2CodecTest, NormalSizeHeader) | |
TEST_F (HTTP2CodecTest, OversizedHeader) | |
TEST_F (HTTP2CodecTest, NormalSizeFrame) | |
TEST_F (HTTP2CodecTest, OversizedFrame) | |
TEST_F (HTTP2CodecTest, BigHeaderCompressed) | |
TEST_F (HTTP2CodecTest, BasicHeaderReply) | |
TEST_F (HTTP2CodecTest, BadHeadersReply) | |
TEST_F (HTTP2CodecTest, Cookies) | |
TEST_F (HTTP2CodecTest, BasicContinuation) | |
TEST_F (HTTP2CodecTest, BasicContinuationEndStream) | |
TEST_F (HTTP2CodecTest, BadContinuation) | |
TEST_F (HTTP2CodecTest, MissingContinuation) | |
TEST_F (HTTP2CodecTest, MissingContinuationBadFrame) | |
TEST_F (HTTP2CodecTest, BadContinuationStream) | |
TEST_F (HTTP2CodecTest, FrameTooLarge) | |
TEST_F (HTTP2CodecTest, UnknownFrameType) | |
TEST_F (HTTP2CodecTest, JunkAfterConnError) | |
TEST_F (HTTP2CodecTest, BasicData) | |
TEST_F (HTTP2CodecTest, LongData) | |
TEST_F (HTTP2CodecTest, MalformedPaddingLength) | |
TEST_F (HTTP2CodecTest, MalformedPadding) | |
TEST_F (HTTP2CodecTest, NoAppByte) | |
TEST_F (HTTP2CodecTest, DataFramePartialDataOnFrameHeaderCall) | |
TEST_F (HTTP2CodecTest, DataFramePartialDataWithNoAppByte) | |
TEST_F (HTTP2CodecTest, BasicRst) | |
TEST_F (HTTP2CodecTest, BasicRstInvalidCode) | |
TEST_F (HTTP2CodecTest, BasicPing) | |
TEST_F (HTTP2CodecTest, BasicWindow) | |
TEST_F (HTTP2CodecTest, ZeroWindow) | |
TEST_F (HTTP2CodecTest, BasicGoaway) | |
TEST_F (HTTP2CodecTest, BadGoaway) | |
TEST_F (HTTP2CodecTest, DoubleGoaway) | |
TEST_F (HTTP2CodecTest, DoubleGoawayWithError) | |
TEST_F (HTTP2CodecTest, GoawayHandling) | |
TEST_F (HTTP2CodecTest, GoawayReply) | |
TEST_F (HTTP2CodecTest, BasicSetting) | |
TEST_F (HTTP2CodecTest, SettingsAck) | |
TEST_F (HTTP2CodecTest, BadSettings) | |
TEST_F (HTTP2CodecTest, BadPushSettings) | |
TEST_F (HTTP2CodecTest, SettingsTableSize) | |
TEST_F (HTTP2CodecTest, BadSettingsTableSize) | |
TEST_F (HTTP2CodecTest, BasicPriority) | |
TEST_F (HTTP2CodecTest, BadHeaderPriority) | |
TEST_F (HTTP2CodecTest, BadPriority) | |
TEST_F (HTTP2CodecTest, VirtualNodes) | |
TEST_F (HTTP2CodecTest, BasicPushPromise) | |
TEST_F (HTTP2CodecTest, BadPushPromise) | |
TEST_F (HTTP2CodecTest, BasicCertificateRequest) | |
TEST_F (HTTP2CodecTest, BasicCertificate) | |
TEST_F (HTTP2CodecTest, BadServerPreface) | |
TEST_F (HTTP2CodecTest, Normal1024Continuation) | |
TEST_F (HTTP2CodecTest, StreamIdOverflow) | |
TEST_F (HTTP2CodecTest, TestMultipleDifferentContentLengthHeaders) | |
TEST_F (HTTP2CodecTest, TestMultipleIdenticalContentLengthHeaders) | |
TEST_F (HTTP2CodecTest, CleartextUpgrade) | |
TEST_F (HTTP2CodecTest, HTTP2SettingsSuccess) | |
TEST_F (HTTP2CodecTest, HTTP2SettingsFailure) | |
TEST_F (HTTP2CodecTest, HTTP2EnableConnect) | |
TEST_F (HTTP2CodecTest, WebsocketUpgrade) | |
TEST_F (HTTP2CodecTest, WebsocketBadHeader) | |
TEST_F (HTTP2CodecTest, WebsocketDupProtocol) | |
TEST_F (HTTP2CodecTest, WebsocketIncorrectResponse) | |
TEST_F (HTTP2CodecTest, TestAllEgressFrameTypeCallbacks) | |
TEST_F (HTTP2CodecTest, Trailers) | |
TEST_F (HTTP2CodecTest, TrailersWithPseudoHeaders) | |
TEST_F (HTTP2CodecTest, TrailersNoBody) | |
TEST_F (HTTP2CodecTest, TrailersContinuation) | |
TEST_F (HTTP2CodecTest, TrailersReply) | |
TEST_F (HTTP2CodecTest, TrailersReplyWithNoData) | |
TEST_F (HTTP2CodecTest, TrailersReplyWithPseudoHeaders) | |
TEST_F (HTTP2CodecTest, TrailersReplyContinuation) | |
TEST_F (HTTP2CodecTest, TrailersReplyMissingContinuation) | |
Variables | |
const uint8_t | kBufEmptyHeader [] |
TEST | ( | HTTP2CodecConstantsTest | , |
HTTPContantsAreCommonHeaders | |||
) |
Definition at line 29 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, proxygen::HTTPCommonHeaders::hash(), proxygen::HTTP_HEADER_COLON_AUTHORITY, proxygen::HTTP_HEADER_COLON_METHOD, proxygen::HTTP_HEADER_COLON_PATH, proxygen::HTTP_HEADER_COLON_SCHEME, proxygen::HTTP_HEADER_COLON_STATUS, proxygen::headers::kAuthority, proxygen::headers::kMethod, proxygen::headers::kPath, proxygen::headers::kScheme, and proxygen::headers::kStatus.
TEST_F | ( | HTTP2CodecTest | , |
IgnoreUnknownSettings | |||
) |
Definition at line 65 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, i, proxygen::parse(), settings, uint32_t, and proxygen::http2::writeSettings().
TEST_F | ( | HTTP2CodecTest | , |
NoExHeaders | |||
) |
TEST_F | ( | HTTP2CodecTest | , |
IgnoreExHeadersSetting | |||
) |
Definition at line 96 of file HTTP2CodecTest.cpp.
References proxygen::ENABLE_EX_HEADERS, EXPECT_EQ, proxygen::parse(), ptr, and proxygen::http2::writeSettings().
TEST_F | ( | HTTP2CodecTest | , |
EnableExHeadersSetting | |||
) |
Definition at line 135 of file HTTP2CodecTest.cpp.
References proxygen::ENABLE_EX_HEADERS, EXPECT_EQ, proxygen::parse(), ptr, and proxygen::http2::writeSettings().
TEST_F | ( | HTTP2CodecTest | , |
InvalidExHeadersSetting | |||
) |
Definition at line 175 of file HTTP2CodecTest.cpp.
References proxygen::ENABLE_EX_HEADERS, EXPECT_EQ, proxygen::parse(), and proxygen::http2::writeSettings().
TEST_F | ( | HTTP2CodecTest | , |
BasicHeader | |||
) |
Definition at line 188 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_EQ, EXPECT_TRUE, proxygen::getGetRequest(), proxygen::HTTPMessage::getHeaders(), proxygen::HTTP_HEADER_CONNECTION, proxygen::HTTP_HEADER_HOST, proxygen::HTTP_HEADER_USER_AGENT, proxygen::parse(), and proxygen::HTTPMessage::setSecure().
TEST_F | ( | HTTP2CodecTest | , |
RequestFromServer | |||
) |
Definition at line 206 of file HTTP2CodecTest.cpp.
References proxygen::ENABLE_EX_HEADERS, EXPECT_EQ, EXPECT_TRUE, proxygen::getGetRequest(), proxygen::HTTP_HEADER_CONNECTION, proxygen::HTTP_HEADER_HOST, proxygen::HTTP_HEADER_USER_AGENT, folly::Random::rand32(), and proxygen::http2::writeSettings().
TEST_F | ( | HTTP2CodecTest | , |
ResponseFromClient | |||
) |
Definition at line 239 of file HTTP2CodecTest.cpp.
References proxygen::ENABLE_EX_HEADERS, EXPECT_EQ, EXPECT_TRUE, proxygen::HTTP_HEADER_CONTENT_TYPE, proxygen::HTTP_HEADER_DATE, proxygen::parse(), folly::Random::rand32(), proxygen::HTTPMessage::setStatusCode(), and proxygen::http2::writeSettings().
TEST_F | ( | HTTP2CodecTest | , |
ExHeadersWithPriority | |||
) |
Definition at line 268 of file HTTP2CodecTest.cpp.
References proxygen::ENABLE_EX_HEADERS, EXPECT_EQ, proxygen::getGetRequest(), proxygen::parse(), and proxygen::http2::writeSettings().
TEST_F | ( | HTTP2CodecTest | , |
IgnoreExHeadersIfNotEnabled | |||
) |
Definition at line 286 of file HTTP2CodecTest.cpp.
References proxygen::ENABLE_EX_HEADERS, EXPECT_EQ, proxygen::getGetRequest(), and proxygen::parse().
TEST_F | ( | HTTP2CodecTest | , |
BadHeaders | |||
) |
Definition at line 299 of file HTTP2CodecTest.cpp.
References proxygen::HPACKCodec::encode(), EXPECT_EQ, h, i, proxygen::headers::kAuthority, proxygen::headers::kMethod, proxygen::http2::kNoPadding, proxygen::headers::kPath, proxygen::headers::kScheme, proxygen::compress::Header::makeHeaderForTest(), folly::gen::move, folly::none, proxygen::parse(), string, proxygen::UPSTREAM, v, and proxygen::http2::writeHeaders().
TEST_F | ( | HTTP2CodecTest | , |
BadPseudoHeaders | |||
) |
Definition at line 351 of file HTTP2CodecTest.cpp.
References proxygen::HPACKCodec::encode(), EXPECT_EQ, proxygen::headers::kMethod, proxygen::http2::kNoPadding, proxygen::headers::kPath, proxygen::headers::kScheme, proxygen::compress::Header::makeHeaderForTest(), folly::gen::move, folly::none, proxygen::parse(), string, proxygen::UPSTREAM, and proxygen::http2::writeHeaders().
TEST_F | ( | HTTP2CodecTest | , |
BadHeaderValues | |||
) |
Definition at line 384 of file HTTP2CodecTest.cpp.
References proxygen::HPACKCodec::encode(), EXPECT_EQ, i, proxygen::headers::kAuthority, proxygen::headers::kMethod, proxygen::http2::kNoPadding, proxygen::headers::kPath, proxygen::headers::kScheme, proxygen::compress::Header::makeHeaderForTest(), folly::gen::move, folly::none, proxygen::parse(), string, proxygen::UPSTREAM, and proxygen::http2::writeHeaders().
TEST_F | ( | HTTP2CodecTest | , |
EmptyHeaderName | |||
) |
Definition at line 429 of file HTTP2CodecTest.cpp.
References fizz::test::copyBuffer(), EXPECT_EQ, kBufEmptyHeader, and proxygen::parse().
TEST_F | ( | HTTP2CodecTest | , |
BasicConnect | |||
) |
Definition at line 439 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), proxygen::CONNECT, EXPECT_EQ, proxygen::HTTPMessage::getHeaders(), proxygen::HTTP_HEADER_HOST, proxygen::parse(), proxygen::HTTPMessage::setMethod(), and string.
TEST_F | ( | HTTP2CodecTest | , |
BadConnect | |||
) |
Definition at line 453 of file HTTP2CodecTest.cpp.
References proxygen::HPACKCodec::encode(), EXPECT_EQ, i, proxygen::headers::kAuthority, proxygen::headers::kHttp, proxygen::headers::kMethod, proxygen::http2::kNoPadding, proxygen::headers::kPath, proxygen::headers::kScheme, proxygen::compress::Header::makeHeaderForTest(), folly::gen::move, folly::none, proxygen::parse(), string, proxygen::UPSTREAM, and proxygen::http2::writeHeaders().
TEST_F | ( | HTTP2CodecTest | , |
NormalSizeHeader | |||
) |
Definition at line 539 of file HTTP2CodecTest.cpp.
TEST_F | ( | HTTP2CodecTest | , |
OversizedHeader | |||
) |
Definition at line 543 of file HTTP2CodecTest.cpp.
TEST_F | ( | HTTP2CodecTest | , |
NormalSizeFrame | |||
) |
Definition at line 547 of file HTTP2CodecTest.cpp.
TEST_F | ( | HTTP2CodecTest | , |
OversizedFrame | |||
) |
Definition at line 551 of file HTTP2CodecTest.cpp.
TEST_F | ( | HTTP2CodecTest | , |
BigHeaderCompressed | |||
) |
Definition at line 555 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_EQ, proxygen::getGetRequest(), proxygen::HTTPMessage::getHeaders(), proxygen::HTTP_HEADER_USER_AGENT, proxygen::MAX_HEADER_LIST_SIZE, proxygen::parse(), and settings.
TEST_F | ( | HTTP2CodecTest | , |
BasicHeaderReply | |||
) |
Definition at line 577 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_EQ, EXPECT_TRUE, proxygen::HTTPMessage::getHeaders(), proxygen::HTTP_HEADER_CONTENT_TYPE, proxygen::HTTP_HEADER_DATE, proxygen::HTTPMessage::setStatusCode(), and proxygen::HTTPMessage::setStatusMessage().
TEST_F | ( | HTTP2CodecTest | , |
BadHeadersReply | |||
) |
Definition at line 595 of file HTTP2CodecTest.cpp.
References proxygen::DOWNSTREAM, proxygen::HPACKCodec::encode(), EXPECT_EQ, h, i, proxygen::http2::kNoPadding, proxygen::headers::kStatus, proxygen::compress::Header::makeHeaderForTest(), folly::gen::move, folly::none, proxygen::parse(), string, v, and proxygen::http2::writeHeaders().
TEST_F | ( | HTTP2CodecTest | , |
Cookies | |||
) |
Definition at line 641 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_EQ, proxygen::getGetRequest(), proxygen::HTTPMessage::getHeaders(), proxygen::parse(), and proxygen::HTTPMessage::setSecure().
TEST_F | ( | HTTP2CodecTest | , |
BasicContinuation | |||
) |
Definition at line 658 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, EXPECT_GT, proxygen::getBigGetRequest(), proxygen::HTTP_HEADER_USER_AGENT, and proxygen::parse().
TEST_F | ( | HTTP2CodecTest | , |
BasicContinuationEndStream | |||
) |
Definition at line 676 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, EXPECT_GT, proxygen::getBigGetRequest(), proxygen::HTTP_HEADER_USER_AGENT, and proxygen::parse().
TEST_F | ( | HTTP2CodecTest | , |
BadContinuation | |||
) |
Definition at line 695 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, proxygen::makeBuf(), folly::gen::move, proxygen::parse(), and proxygen::http2::writeContinuation().
TEST_F | ( | HTTP2CodecTest | , |
MissingContinuation | |||
) |
Definition at line 708 of file HTTP2CodecTest.cpp.
References proxygen::ENHANCE_YOUR_CALM, EXPECT_EQ, proxygen::getBigGetRequest(), proxygen::http2::kFrameHeaderSize, gmock_output_test::output, proxygen::parse(), and proxygen::http2::writeGoaway().
TEST_F | ( | HTTP2CodecTest | , |
MissingContinuationBadFrame | |||
) |
Definition at line 730 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, proxygen::getBigGetRequest(), proxygen::http2::kFrameHeaderSize, proxygen::makeBuf(), folly::gen::move, gmock_output_test::output, proxygen::parse(), and uint32_t.
TEST_F | ( | HTTP2CodecTest | , |
BadContinuationStream | |||
) |
Definition at line 754 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, proxygen::getBigGetRequest(), proxygen::http2::kFrameHeaderSize, proxygen::makeBuf(), folly::gen::move, proxygen::parse(), and proxygen::http2::writeContinuation().
TEST_F | ( | HTTP2CodecTest | , |
FrameTooLarge | |||
) |
Definition at line 774 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, proxygen::FRAME_SIZE_ERROR, proxygen::parse(), and writeFrameHeaderManual().
TEST_F | ( | HTTP2CodecTest | , |
UnknownFrameType | |||
) |
Definition at line 788 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), proxygen::getGetRequest(), proxygen::HTTPMessage::getHeaders(), proxygen::HTTP_HEADER_USER_AGENT, proxygen::parse(), and writeFrameHeaderManual().
TEST_F | ( | HTTP2CodecTest | , |
JunkAfterConnError | |||
) |
Definition at line 801 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_EQ, proxygen::getGetRequest(), proxygen::HTTPMessage::getHeaders(), proxygen::http2::HEADERS, proxygen::HTTP_HEADER_USER_AGENT, proxygen::parse(), uint8_t, and writeFrameHeaderManual().
TEST_F | ( | HTTP2CodecTest | , |
BasicData | |||
) |
Definition at line 818 of file HTTP2CodecTest.cpp.
References folly::IOBuf::copyBuffer(), data, EXPECT_EQ, folly::gen::move, proxygen::HTTPCodec::NoPadding, and proxygen::parse().
TEST_F | ( | HTTP2CodecTest | , |
LongData | |||
) |
Definition at line 835 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, proxygen::makeBuf(), proxygen::MAX_FRAME_SIZE, proxygen::HTTPCodec::NoPadding, proxygen::parse(), proxygen::HTTPSettings::setSetting(), and settings.
TEST_F | ( | HTTP2CodecTest | , |
MalformedPaddingLength | |||
) |
Definition at line 854 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, proxygen::parse(), and uint8_t.
TEST_F | ( | HTTP2CodecTest | , |
MalformedPadding | |||
) |
Definition at line 873 of file HTTP2CodecTest.cpp.
References EXPECT_FALSE, proxygen::parse(), and uint8_t.
TEST_F | ( | HTTP2CodecTest | , |
NoAppByte | |||
) |
Definition at line 883 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, proxygen::parse(), and uint8_t.
TEST_F | ( | HTTP2CodecTest | , |
DataFramePartialDataOnFrameHeaderCall | |||
) |
Definition at line 903 of file HTTP2CodecTest.cpp.
References testing::_, fizz::test::copyBuffer(), EXPECT_CALL, EXPECT_EQ, and proxygen::makeBuf().
TEST_F | ( | HTTP2CodecTest | , |
DataFramePartialDataWithNoAppByte | |||
) |
Definition at line 923 of file HTTP2CodecTest.cpp.
References fizz::test::copyBuffer(), EXPECT_EQ, and proxygen::makeBuf().
TEST_F | ( | HTTP2CodecTest | , |
BasicRst | |||
) |
Definition at line 956 of file HTTP2CodecTest.cpp.
References proxygen::ENHANCE_YOUR_CALM, EXPECT_EQ, and proxygen::parse().
TEST_F | ( | HTTP2CodecTest | , |
BasicRstInvalidCode | |||
) |
Definition at line 968 of file HTTP2CodecTest.cpp.
References proxygen::_SPDY_INVALID_STREAM, EXPECT_EQ, and proxygen::parse().
TEST_F | ( | HTTP2CodecTest | , |
BasicPing | |||
) |
Definition at line 980 of file HTTP2CodecTest.cpp.
References c, EXPECT_EQ, proxygen::http2::kConnectionPreface, proxygen::http2::kFrameHeaderSize, proxygen::parse(), folly::io::detail::CursorBase< Derived, BufType >::read(), folly::io::detail::CursorBase< Derived, BufType >::skip(), and uint64_t.
TEST_F | ( | HTTP2CodecTest | , |
BasicWindow | |||
) |
Definition at line 1001 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, proxygen::http2::kMaxWindowUpdateSize, and proxygen::parse().
TEST_F | ( | HTTP2CodecTest | , |
ZeroWindow | |||
) |
Definition at line 1018 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, proxygen::http2::kFrameWindowUpdateSize, proxygen::parse(), proxygen::PROTOCOL_ERROR, streamID, uint32_t, and folly::io::detail::Writable< Derived >::writeBE().
TEST_F | ( | HTTP2CodecTest | , |
BasicGoaway | |||
) |
Definition at line 1035 of file HTTP2CodecTest.cpp.
References folly::IOBuf::copyBuffer(), proxygen::ENHANCE_YOUR_CALM, EXPECT_EQ, folly::gen::move, and proxygen::parse().
TEST_F | ( | HTTP2CodecTest | , |
BadGoaway | |||
) |
Definition at line 1048 of file HTTP2CodecTest.cpp.
References folly::IOBuf::copyBuffer(), proxygen::ENHANCE_YOUR_CALM, EXPECT_DEATH_NO_CORE, and folly::gen::move.
TEST_F | ( | HTTP2CodecTest | , |
DoubleGoaway | |||
) |
Definition at line 1057 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, max, proxygen::NO_ERROR, and proxygen::parse().
TEST_F | ( | HTTP2CodecTest | , |
DoubleGoawayWithError | |||
) |
Definition at line 1095 of file HTTP2CodecTest.cpp.
References folly::IOBuf::copyBuffer(), proxygen::ENHANCE_YOUR_CALM, EXPECT_EQ, EXPECT_FALSE, max, folly::gen::move, and proxygen::NO_ERROR.
TEST_F | ( | HTTP2CodecTest | , |
GoawayHandling | |||
) |
Definition at line 1115 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), proxygen::CANCEL, wangle::HTTPHeaderSize::compressed, proxygen::http2::DATA, dummy(), proxygen::ENABLE_PUSH, EXPECT_EQ, EXPECT_GT, proxygen::getGetRequest(), proxygen::HTTPMessage::getHeaders(), proxygen::makeBuf(), proxygen::NO_ERROR, proxygen::HTTPCodec::NoPadding, proxygen::parse(), proxygen::HTTPMessage::setStatusCode(), settings, folly::size(), uint8_t, wangle::HTTPHeaderSize::uncompressed, and writeFrameHeaderManual().
TEST_F | ( | HTTP2CodecTest | , |
GoawayReply | |||
) |
Definition at line 1181 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, proxygen::HTTP_HEADER_DATE, proxygen::NO_ERROR, proxygen::parse(), proxygen::HTTPMessage::setStatusCode(), and proxygen::HTTPMessage::setStatusMessage().
TEST_F | ( | HTTP2CodecTest | , |
BasicSetting | |||
) |
Definition at line 1200 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, proxygen::INITIAL_WINDOW_SIZE, proxygen::MAX_CONCURRENT_STREAMS, proxygen::parse(), and settings.
TEST_F | ( | HTTP2CodecTest | , |
SettingsAck | |||
) |
TEST_F | ( | HTTP2CodecTest | , |
BadSettings | |||
) |
Definition at line 1224 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, proxygen::INITIAL_WINDOW_SIZE, proxygen::parse(), and settings.
TEST_F | ( | HTTP2CodecTest | , |
BadPushSettings | |||
) |
Definition at line 1235 of file HTTP2CodecTest.cpp.
References folly::IOBuf::computeChainDataLength(), proxygen::ENABLE_PUSH, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, proxygen::http2::kFrameHeaderSize, and settings.
TEST_F | ( | HTTP2CodecTest | , |
SettingsTableSize | |||
) |
Definition at line 1254 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_EQ, EXPECT_TRUE, proxygen::HTTPMessage::getHeaders(), proxygen::HEADER_TABLE_SIZE, proxygen::HTTP_HEADER_CONTENT_TYPE, proxygen::HTTP_HEADER_DATE, proxygen::parse(), proxygen::HTTPMessage::setStatusCode(), proxygen::HTTPMessage::setStatusMessage(), and settings.
TEST_F | ( | HTTP2CodecTest | , |
BadSettingsTableSize | |||
) |
Definition at line 1280 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_EQ, proxygen::HTTPMessage::getHeaders(), proxygen::HEADER_TABLE_SIZE, proxygen::HTTP_HEADER_CONTENT_TYPE, proxygen::parse(), proxygen::HTTPMessage::setStatusCode(), proxygen::HTTPMessage::setStatusMessage(), and settings.
TEST_F | ( | HTTP2CodecTest | , |
BasicPriority | |||
) |
Definition at line 1313 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, and proxygen::parse().
TEST_F | ( | HTTP2CodecTest | , |
BadHeaderPriority | |||
) |
Definition at line 1323 of file HTTP2CodecTest.cpp.
References c, EXPECT_EQ, EXPECT_TRUE, proxygen::getGetRequest(), proxygen::http2::kConnectionPreface, proxygen::http2::kFrameHeaderSize, proxygen::parse(), proxygen::HTTPMessage::setHTTP2Priority(), folly::io::detail::CursorBase< Derived, BufType >::skip(), uint32_t, and folly::io::detail::Writable< Derived >::writeBE().
TEST_F | ( | HTTP2CodecTest | , |
BadPriority | |||
) |
Definition at line 1339 of file HTTP2CodecTest.cpp.
References c, EXPECT_EQ, EXPECT_TRUE, proxygen::http2::kConnectionPreface, proxygen::http2::kFrameHeaderSize, proxygen::parse(), folly::io::detail::CursorBase< Derived, BufType >::skip(), uint32_t, and folly::io::detail::Writable< Derived >::writeBE().
TEST_F | ( | HTTP2CodecTest | , |
VirtualNodes | |||
) |
Definition at line 1365 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, i, DummyQueue::nodes_, proxygen::parse(), and uint8_t.
TEST_F | ( | HTTP2CodecTest | , |
BasicPushPromise | |||
) |
Definition at line 1382 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), proxygen::ENABLE_PUSH, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, proxygen::getGetRequest(), proxygen::HTTPMessage::getHeaders(), proxygen::HTTP_HEADER_CONTENT_TYPE, proxygen::HTTP_HEADER_DATE, proxygen::HTTP_HEADER_USER_AGENT, i, proxygen::parse(), proxygen::HTTPMessage::setStatusCode(), and settings.
TEST_F | ( | HTTP2CodecTest | , |
BadPushPromise | |||
) |
Definition at line 1430 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_EQ, proxygen::getGetRequest(), proxygen::HTTPMessage::getHeaders(), and proxygen::HTTP_HEADER_USER_AGENT.
TEST_F | ( | HTTP2CodecTest | , |
BasicCertificateRequest | |||
) |
Definition at line 1446 of file HTTP2CodecTest.cpp.
References folly::IOBuf::copyBuffer(), EXPECT_EQ, folly::gen::move, proxygen::parse(), and uint16_t.
TEST_F | ( | HTTP2CodecTest | , |
BasicCertificate | |||
) |
Definition at line 1461 of file HTTP2CodecTest.cpp.
References folly::IOBuf::copyBuffer(), EXPECT_EQ, folly::gen::move, proxygen::parse(), and uint16_t.
TEST_F | ( | HTTP2CodecTest | , |
BadServerPreface | |||
) |
TEST_F | ( | HTTP2CodecTest | , |
Normal1024Continuation | |||
) |
Definition at line 1487 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_EQ, proxygen::getGetRequest(), proxygen::HTTPMessage::getHeaders(), proxygen::parse(), and proxygen::HTTPMessage::setHTTP2Priority().
TEST_F | ( | HTTP2CodecTest | , |
StreamIdOverflow | |||
) |
Definition at line 1510 of file HTTP2CodecTest.cpp.
References codec, proxygen::HTTPParallelCodec::createStream(), EXPECT_EQ, proxygen::HTTPParallelCodec::isReusable(), max, proxygen::HTTPParallelCodec::setNextEgressStreamId(), and proxygen::UPSTREAM.
TEST_F | ( | HTTP2CodecTest | , |
TestMultipleDifferentContentLengthHeaders | |||
) |
Definition at line 1521 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_EQ, proxygen::HTTPMessage::getHeaders(), proxygen::HTTPHeaders::getNumberOfValues(), proxygen::getPostRequest(), proxygen::HTTP_HEADER_CONTENT_LENGTH, and proxygen::parse().
TEST_F | ( | HTTP2CodecTest | , |
TestMultipleIdenticalContentLengthHeaders | |||
) |
Definition at line 1537 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_EQ, proxygen::HTTPMessage::getHeaders(), proxygen::HTTPHeaders::getNumberOfValues(), proxygen::getPostRequest(), and proxygen::parse().
TEST_F | ( | HTTP2CodecTest | , |
CleartextUpgrade | |||
) |
Definition at line 1552 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), proxygen::HTTPMessage::checkForHeaderToken(), EXPECT_EQ, EXPECT_GT, EXPECT_TRUE, proxygen::getGetRequest(), proxygen::HTTPMessage::getHeaders(), proxygen::HTTPHeaders::getSingleOrEmpty(), proxygen::HTTP_HEADER_CONNECTION, proxygen::HTTP_HEADER_UPGRADE, proxygen::HTTP_HEADER_USER_AGENT, proxygen::http2::kProtocolSettingsHeader, and proxygen::HTTP2Codec::requestUpgrade().
TEST_F | ( | HTTP2CodecTest | , |
HTTP2SettingsSuccess | |||
) |
Definition at line 1567 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_TRUE, proxygen::getGetRequest(), proxygen::HTTPMessage::getHeaders(), proxygen::http2::kProtocolSettingsHeader, and proxygen::HTTP2Codec::requestUpgrade().
TEST_F | ( | HTTP2CodecTest | , |
HTTP2SettingsFailure | |||
) |
Definition at line 1579 of file HTTP2CodecTest.cpp.
References EXPECT_FALSE, proxygen::getGetRequest(), proxygen::HTTPMessage::getHeaders(), proxygen::http2::kMaxFramePayloadLength, proxygen::http2::kProtocolSettingsHeader, and proxygen::HTTPHeaders::set().
TEST_F | ( | HTTP2CodecTest | , |
HTTP2EnableConnect | |||
) |
Definition at line 1607 of file HTTP2CodecTest.cpp.
References proxygen::ENABLE_CONNECT_PROTOCOL, and EXPECT_EQ.
TEST_F | ( | HTTP2CodecTest | , |
WebsocketUpgrade | |||
) |
Definition at line 1625 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, EXPECT_NE, EXPECT_TRUE, proxygen::getGetRequest(), proxygen::headers::kWebsocketString, proxygen::parse(), proxygen::HTTPMessage::setEgressWebsocketUpgrade(), and proxygen::HTTPMessage::setSecure().
TEST_F | ( | HTTP2CodecTest | , |
WebsocketBadHeader | |||
) |
Definition at line 1638 of file HTTP2CodecTest.cpp.
References proxygen::HPACKCodec::encode(), EXPECT_EQ, i, proxygen::headers::kMethod, proxygen::http2::kNoPadding, proxygen::headers::kPath, proxygen::headers::kProtocol, proxygen::headers::kScheme, proxygen::headers::kWebsocketString, proxygen::compress::Header::makeHeaderForTest(), folly::gen::move, folly::none, proxygen::parse(), string, proxygen::UPSTREAM, and proxygen::http2::writeHeaders().
TEST_F | ( | HTTP2CodecTest | , |
WebsocketDupProtocol | |||
) |
Definition at line 1674 of file HTTP2CodecTest.cpp.
References proxygen::HPACKCodec::encode(), EXPECT_EQ, proxygen::headers::kMethod, proxygen::http2::kNoPadding, proxygen::headers::kPath, proxygen::headers::kProtocol, proxygen::headers::kScheme, proxygen::headers::kWebsocketString, proxygen::compress::Header::makeHeaderForTest(), folly::gen::move, folly::none, proxygen::parse(), string, proxygen::UPSTREAM, and proxygen::http2::writeHeaders().
TEST_F | ( | HTTP2CodecTest | , |
WebsocketIncorrectResponse | |||
) |
Definition at line 1702 of file HTTP2CodecTest.cpp.
References EXPECT_EQ, proxygen::getGetRequest(), proxygen::parse(), proxygen::HTTPMessage::setEgressWebsocketUpgrade(), proxygen::HTTPMessage::setSecure(), proxygen::HTTPMessage::setStatusCode(), and proxygen::HTTPMessage::setStatusMessage().
TEST_F | ( | HTTP2CodecTest | , |
TestAllEgressFrameTypeCallbacks | |||
) |
Definition at line 1723 of file HTTP2CodecTest.cpp.
References testing::_, add, wangle::HTTPHeaderSize::compressed, proxygen::http2::CONTINUATION, folly::IOBuf::copyBuffer(), proxygen::http2::DATA, data, proxygen::ENHANCE_YOUR_CALM, proxygen::http2::EX_HEADERS, EXPECT_CALL, EXPECT_TRUE, proxygen::getBigGetRequest(), proxygen::getGetRequest(), proxygen::http2::GOAWAY, proxygen::http2::HEADERS, testing::Invoke(), folly::gen::move, proxygen::HTTPCodec::NoPadding, proxygen::http2::PING, proxygen::http2::PRIORITY, proxygen::http2::PUSH_PROMISE, folly::Random::rand32(), proxygen::http2::RST_STREAM, proxygen::http2::SETTINGS, folly::size(), type, uint16_t, uint64_t, uint8_t, wangle::HTTPHeaderSize::uncompressed, and proxygen::http2::WINDOW_UPDATE.
TEST_F | ( | HTTP2CodecTest | , |
Trailers | |||
) |
Definition at line 1799 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), folly::IOBuf::copyBuffer(), data, EXPECT_EQ, EXPECT_NE, proxygen::getGetRequest(), proxygen::HTTPMessage::getHeaders(), proxygen::HTTP_HEADER_USER_AGENT, folly::gen::move, proxygen::HTTPCodec::NoPadding, and proxygen::parse().
TEST_F | ( | HTTP2CodecTest | , |
TrailersWithPseudoHeaders | |||
) |
Definition at line 1831 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), folly::IOBuf::copyBuffer(), data, proxygen::HPACKCodec::encode(), EXPECT_EQ, proxygen::getGetRequest(), proxygen::HTTPMessage::getHeaders(), proxygen::HTTP_HEADER_USER_AGENT, proxygen::headers::kMethod, proxygen::http2::kNoPadding, proxygen::compress::Header::makeHeaderForTest(), folly::gen::move, folly::none, proxygen::HTTPCodec::NoPadding, proxygen::parse(), string, proxygen::UPSTREAM, and proxygen::http2::writeHeaders().
TEST_F | ( | HTTP2CodecTest | , |
TrailersNoBody | |||
) |
Definition at line 1866 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_EQ, EXPECT_NE, proxygen::getGetRequest(), proxygen::HTTPMessage::getHeaders(), proxygen::HTTP_HEADER_USER_AGENT, and proxygen::parse().
TEST_F | ( | HTTP2CodecTest | , |
TrailersContinuation | |||
) |
Definition at line 1893 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_EQ, EXPECT_NE, proxygen::getGetRequest(), proxygen::http2::kMaxFramePayloadLengthMin, proxygen::parse(), and string.
TEST_F | ( | HTTP2CodecTest | , |
TrailersReply | |||
) |
Definition at line 1922 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), folly::IOBuf::copyBuffer(), data, EXPECT_EQ, EXPECT_NE, EXPECT_TRUE, proxygen::HTTPMessage::getHeaders(), proxygen::HTTP_HEADER_CONTENT_TYPE, proxygen::HTTP_HEADER_DATE, folly::gen::move, proxygen::HTTPCodec::NoPadding, proxygen::HTTPMessage::setStatusCode(), and proxygen::HTTPMessage::setStatusMessage().
TEST_F | ( | HTTP2CodecTest | , |
TrailersReplyWithNoData | |||
) |
Definition at line 1959 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_EQ, EXPECT_NE, EXPECT_TRUE, proxygen::HTTPMessage::getHeaders(), proxygen::HTTP_HEADER_CONTENT_TYPE, proxygen::HTTP_HEADER_DATE, proxygen::HTTPMessage::setStatusCode(), and proxygen::HTTPMessage::setStatusMessage().
TEST_F | ( | HTTP2CodecTest | , |
TrailersReplyWithPseudoHeaders | |||
) |
Definition at line 1988 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), folly::IOBuf::copyBuffer(), data, proxygen::DOWNSTREAM, proxygen::HPACKCodec::encode(), EXPECT_EQ, proxygen::HTTPMessage::getHeaders(), proxygen::HTTP_HEADER_CONTENT_TYPE, proxygen::headers::kMethod, proxygen::http2::kNoPadding, proxygen::compress::Header::makeHeaderForTest(), folly::gen::move, folly::none, proxygen::HTTPCodec::NoPadding, proxygen::HTTPMessage::setStatusCode(), proxygen::HTTPMessage::setStatusMessage(), string, and proxygen::http2::writeHeaders().
TEST_F | ( | HTTP2CodecTest | , |
TrailersReplyContinuation | |||
) |
Definition at line 2023 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), EXPECT_EQ, EXPECT_NE, proxygen::http2::kMaxFramePayloadLengthMin, proxygen::HTTPMessage::setStatusCode(), and string.
TEST_F | ( | HTTP2CodecTest | , |
TrailersReplyMissingContinuation | |||
) |
Definition at line 2055 of file HTTP2CodecTest.cpp.
References proxygen::HTTPHeaders::add(), proxygen::ENHANCE_YOUR_CALM, EXPECT_EQ, proxygen::http2::kFrameHeaderSize, proxygen::http2::kMaxFramePayloadLengthMin, proxygen::HTTPMessage::setStatusCode(), string, and proxygen::http2::writeGoaway().
const uint8_t kBufEmptyHeader[] |
Ingress bytes with an empty header name
Definition at line 422 of file HTTP2CodecTest.cpp.
Referenced by TEST_F().