mirror of https://github.com/Icinga/icinga2.git
parent
8c20039dfe
commit
92364d7b73
|
@ -51,7 +51,7 @@ bool HttpRequest::Parse(const Stream::Ptr& stream, StreamReadContext& src, bool
|
||||||
|
|
||||||
std::vector<String> tokens;
|
std::vector<String> tokens;
|
||||||
boost::algorithm::split(tokens, line, boost::is_any_of(" "));
|
boost::algorithm::split(tokens, line, boost::is_any_of(" "));
|
||||||
Log(LogWarning, "HttpRequest")
|
Log(LogDebug, "HttpRequest")
|
||||||
<< "line: " << line << ", tokens: " << tokens.size();
|
<< "line: " << line << ", tokens: " << tokens.size();
|
||||||
if (tokens.size() != 3)
|
if (tokens.size() != 3)
|
||||||
BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid HTTP request"));
|
BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid HTTP request"));
|
||||||
|
@ -66,8 +66,6 @@ bool HttpRequest::Parse(const Stream::Ptr& stream, StreamReadContext& src, bool
|
||||||
BOOST_THROW_EXCEPTION(std::invalid_argument("Unsupported HTTP version"));
|
BOOST_THROW_EXCEPTION(std::invalid_argument("Unsupported HTTP version"));
|
||||||
|
|
||||||
m_State = HttpRequestHeaders;
|
m_State = HttpRequestHeaders;
|
||||||
Log(LogWarning, "HttpRequest")
|
|
||||||
<< "Method: " << RequestMethod << ", Url: " << RequestUrl;
|
|
||||||
} else if (m_State == HttpRequestHeaders) {
|
} else if (m_State == HttpRequestHeaders) {
|
||||||
if (line == "") {
|
if (line == "") {
|
||||||
m_State = HttpRequestBody;
|
m_State = HttpRequestBody;
|
||||||
|
@ -78,7 +76,6 @@ bool HttpRequest::Parse(const Stream::Ptr& stream, StreamReadContext& src, bool
|
||||||
else
|
else
|
||||||
m_Body = new FIFO();
|
m_Body = new FIFO();
|
||||||
|
|
||||||
Log(LogWarning, "HttpRequest", "Waiting for message body");
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue