mirror of https://github.com/Icinga/icinga2.git
Rename HttpRequest.Url to HttpRequest.RequestUrl
Otherwise gcc will break with the Url class, clang works. refs #9447
This commit is contained in:
parent
8bf949852a
commit
269e79647f
|
@ -51,7 +51,7 @@ StreamReadStatus HttpChunkedEncoding::ReadChunkFromStream(const Stream::Ptr& str
|
|||
scontext.MustRead = false;
|
||||
}
|
||||
|
||||
if (scontext.Size < context.LengthIndicator) {
|
||||
if (scontext.Size < (size_t)context.LengthIndicator) {
|
||||
scontext.MustRead = true;
|
||||
return StatusNeedData;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ void HttpHandler::ProcessRequest(const ApiUser::Ptr& user, HttpRequest& request,
|
|||
HttpHandler::Ptr current_handler, handler;
|
||||
bool exact_match = true;
|
||||
|
||||
BOOST_FOREACH(const String& elem, request.Url->GetPath()) {
|
||||
BOOST_FOREACH(const String& elem, request.RequestUrl->GetPath()) {
|
||||
current_handler = node->Get("handler");
|
||||
if (current_handler)
|
||||
handler = current_handler;
|
||||
|
@ -86,7 +86,7 @@ void HttpHandler::ProcessRequest(const ApiUser::Ptr& user, HttpRequest& request,
|
|||
handler = current_handler;
|
||||
}
|
||||
|
||||
if (!handler || (!exact_match && !handler->CanAlsoHandleUrl(request.Url))) {
|
||||
if (!handler || (!exact_match && !handler->CanAlsoHandleUrl(request.RequestUrl))) {
|
||||
response.SetStatus(404, "Not found");
|
||||
String msg = "<h1>Not found</h1>";
|
||||
response.WriteBody(msg.CStr(), msg.GetLength());
|
||||
|
|
|
@ -56,7 +56,7 @@ bool HttpRequest::Parse(const Stream::Ptr& stream, StreamReadContext& src, bool
|
|||
if (tokens.size() != 3)
|
||||
BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid HTTP request"));
|
||||
RequestMethod = tokens[0];
|
||||
Url = new class Url(tokens[1]);
|
||||
RequestUrl = new class Url(tokens[1]);
|
||||
|
||||
if (tokens[2] == "HTTP/1.0")
|
||||
ProtocolVersion = HttpVersion10;
|
||||
|
@ -67,7 +67,7 @@ bool HttpRequest::Parse(const Stream::Ptr& stream, StreamReadContext& src, bool
|
|||
|
||||
m_State = HttpRequestHeaders;
|
||||
Log(LogWarning, "HttpRequest")
|
||||
<< "Method: " << RequestMethod << ", Url: " << Url;
|
||||
<< "Method: " << RequestMethod << ", Url: " << RequestUrl;
|
||||
} else if (m_State == HttpRequestHeaders) {
|
||||
if (line == "") {
|
||||
m_State = HttpRequestBody;
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
bool Complete;
|
||||
|
||||
String RequestMethod;
|
||||
Url::Ptr Url;
|
||||
Url::Ptr RequestUrl;
|
||||
HttpVersion ProtocolVersion;
|
||||
|
||||
Dictionary::Ptr Headers;
|
||||
|
|
Loading…
Reference in New Issue