Definition at line 83 of file CompressionUtils.cpp.
References proxygen::CONNECT, cookie, proxygen::HTTPHeaders::forEachWithCode(), proxygen::HTTPMessage::getHeaders(), proxygen::HTTPMessage::getMethod(), proxygen::HTTPMessage::getMethodString(), proxygen::HTTPHeaders::getSingleOrEmpty(), proxygen::HTTPMessage::getURL(), proxygen::HTTP_HEADER_COLON_AUTHORITY, proxygen::HTTP_HEADER_COLON_METHOD, proxygen::HTTP_HEADER_COLON_PATH, proxygen::HTTP_HEADER_COLON_SCHEME, proxygen::HTTP_HEADER_COOKIE, proxygen::HTTP_HEADER_HOST, proxygen::HTTPMessage::isSecure(), proxygen::headers::kAuthority, proxygen::headers::kHttp, proxygen::headers::kHttps, proxygen::headers::kMethod, proxygen::headers::kPath, proxygen::headers::kScheme, folly::ltrimWhitespace(), folly::split(), and value.
Referenced by proxygen::compress::CompressionSimulator::encode().
86 std::vector<compress::Header> allHeaders;
95 if (msg.
getMethod() != HTTPMethod::CONNECT) {
96 allHeaders.emplace_back(
104 allHeaders.emplace_back(
113 vector<folly::StringPiece> cookiePieces;
115 cookies.reserve(cookies.size() + cookiePieces.size());
116 for (
auto cookie : cookiePieces) {
118 allHeaders.emplace_back(code, name, cookies.back());
124 allHeaders.emplace_back(code, name, value);
StringPiece ltrimWhitespace(StringPiece sp)
void split(const Delim &delimiter, const String &input, std::vector< OutputType > &out, bool ignoreEmpty)
static const char *const value
HTTPHeaders & getHeaders()
const std::string & getMethodString() const
folly::Optional< HTTPMethod > getMethod() const
const std::string & getURL() const