mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-07 13:54:38 +02:00
parent
8c20039dfe
commit
92364d7b73
@ -51,7 +51,7 @@ bool HttpRequest::Parse(const Stream::Ptr& stream, StreamReadContext& src, bool
|
||||
|
||||
std::vector<String> tokens;
|
||||
boost::algorithm::split(tokens, line, boost::is_any_of(" "));
|
||||
Log(LogWarning, "HttpRequest")
|
||||
Log(LogDebug, "HttpRequest")
|
||||
<< "line: " << line << ", tokens: " << tokens.size();
|
||||
if (tokens.size() != 3)
|
||||
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"));
|
||||
|
||||
m_State = HttpRequestHeaders;
|
||||
Log(LogWarning, "HttpRequest")
|
||||
<< "Method: " << RequestMethod << ", Url: " << RequestUrl;
|
||||
} else if (m_State == HttpRequestHeaders) {
|
||||
if (line == "") {
|
||||
m_State = HttpRequestBody;
|
||||
@ -78,7 +76,6 @@ bool HttpRequest::Parse(const Stream::Ptr& stream, StreamReadContext& src, bool
|
||||
else
|
||||
m_Body = new FIFO();
|
||||
|
||||
Log(LogWarning, "HttpRequest", "Waiting for message body");
|
||||
return true;
|
||||
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user