14 #include <boost/optional/optional_io.hpp> 19 using namespace folly;
26 {SettingsId::INITIAL_WINDOW_SIZE, 65536}
30 auto ret = std::make_unique<HTTPMessage>();
32 ret->setPriority(priority);
41 while (cursor.length() >= 8) {
44 while (cursor.length()) {
50 std::unique_ptr<testing::NiceMock<MockHTTPCodec>>
52 auto codec = std::make_unique<testing::NiceMock<MockHTTPCodec>>();
66 std::unique_ptr<testing::NiceMock<MockHTTPCodec>>
71 std::unique_ptr<testing::NiceMock<MockHTTPCodec>>
109 folly::to<string>(contentLength));
125 return std::make_unique<HTTPMessage>(
getPostRequest(contentLength));
142 folly::to<string>(bodyLen));
148 auto resp = std::make_unique<HTTPMessage>();
149 resp->setStatusCode(statusCode);
150 resp->setHTTPVersion(1, 1);
154 std::tuple<std::unique_ptr<HTTPMessage>, std::unique_ptr<folly::IOBuf> >
168 folly::to<std::string>(bodyLen));
195 std::shared_ptr<folly::IOBuf> chain,
198 auto len = chain->computeChainDataLength();
199 writeBuf.
append(chain->clone());
245 std::shared_ptr<folly::IOBuf>) {
279 std::shared_ptr<folly::IOBuf>) {
287 std::shared_ptr<folly::IOBuf>) {
std::unique_ptr< testing::NiceMock< MockHTTPCodec > > makeDownstreamParallelCodec()
void append(std::unique_ptr< folly::IOBuf > &&buf, bool pack=false)
spdy::GoawayStatusCode statusCode
HTTPMessage getChunkedPostRequest()
std::tuple< std::unique_ptr< HTTPMessage >, std::unique_ptr< folly::IOBuf > > makeResponse(uint16_t statusCode, size_t len)
static std::unique_ptr< IOBuf > create(std::size_t capacity)
std::enable_if< std::is_arithmetic< T >::value >::type write(T value)
constexpr detail::Map< Move > move
HTTPMessage getBigGetRequest(const std::string &url)
—— Concurrent Priority Queue Implementation ——
std::unique_ptr< HTTPMessage > makePostRequest(uint32_t contentLength)
std::unique_ptr< folly::IOBuf > makeBuf(uint32_t size)
void setIsChunked(bool chunked)
const uint32_t kMaxFramePayloadLengthMin
constexpr auto size(C const &c) -> decltype(c.size())
void writeBuf(const Buf &buf, folly::io::Appender &out)
std::unique_ptr< HTTPMessage > getPriorityMessage(uint8_t priority)
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
std::unique_ptr< testing::NiceMock< MockHTTPCodec > > makeMockParallelCodec(TransportDirection dir)
HTTPMessage getResponse(uint32_t code, uint32_t bodyLen)
void fakeMockCodec(MockHTTPCodec &codec)
HTTPHeaders & getHeaders()
void setMethod(HTTPMethod method)
HTTPMessage getGetRequest(const std::string &url)
HTTPMessage getPostRequest(uint32_t contentLength)
void setHTTPVersion(uint8_t major, uint8_t minor)
std::unique_ptr< HTTPMessage > makeGetRequest()
#define EXPECT_CALL(obj, call)
const internal::AnythingMatcher _
HTTPMessage getUpgradeRequest(const std::string &upgradeHeader, HTTPMethod method, uint32_t bodyLen)
const HTTPSettings kDefaultIngressSettings
internal::ReturnAction< R > Return(R value)
std::unique_ptr< testing::NiceMock< MockHTTPCodec > > makeUpstreamParallelCodec()
HTTPMessage getPubRequest(const std::string &url)
const std::string kVersionStrv2
void setStatusCode(uint16_t status)