34 error =
"Duplicate method";
38 error =
"Invalid method";
42 assert(
msg_ !=
nullptr);
49 error =
"Duplicate path";
53 error =
"Invalid url";
57 assert(
msg_ !=
nullptr);
64 error =
"Duplicate scheme";
69 error =
"Invalid scheme";
75 assert(
msg_ !=
nullptr);
83 error =
"Duplicate authority";
87 error =
"Invalid authority";
91 assert(
msg_ !=
nullptr);
98 error =
"Duplicate protocol";
114 error = folly::to<std::string>(
"Malformed CONNECT request m/a/s/pa/pr=",
119 error = folly::to<std::string>(
"Malformed request m/a/s/pa/pr=",
123 return error.empty();
void setMessage(HTTPMessage *msg)
bool setUpgradeProtocol(folly::StringPiece protocol)
bool setScheme(folly::StringPiece scheme)
void reset(HTTPMessage *msg)
static bool validateMethod(folly::ByteRange method)
void setHasScheme(bool hasScheme)
void setSecure(bool secure)
bool setMethod(folly::StringPiece method)
static bool validateURL(folly::ByteRange url)
bool hasUpgradeProtocol()
void setHasUpgradeProtocol(bool val)
void setUpgradeProtocol(std::string protocol)
void setHasMethod(bool hasMethod)
HTTPHeaders & getHeaders()
void setMethod(HTTPMethod method)
bool setAuthority(folly::StringPiece authority)
static bool validateHeaderValue(folly::ByteRange value, CtlEscapeMode mode)
void setHasAuthority(bool hasAuthority)
folly::Optional< HTTPMethod > getMethod() const
void setHasPath(bool hasPath)
bool setPath(folly::StringPiece path)