]> granicus.if.org Git - icinga2/commitdiff
Rename HttpRequest.Url to HttpRequest.RequestUrl
authorMichael Friedrich <michael.friedrich@netways.de>
Thu, 9 Jul 2015 15:32:19 +0000 (17:32 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Thu, 9 Jul 2015 15:32:19 +0000 (17:32 +0200)
Otherwise gcc will break with the Url class, clang works.

refs #9447

lib/remote/httpchunkedencoding.cpp
lib/remote/httphandler.cpp
lib/remote/httprequest.cpp
lib/remote/httprequest.hpp

index 81b815c70618ec721546a3b4f49b3ad430f28000..4d8aa7ca88aa755911de703c282b2c3d9afdbd22 100644 (file)
@@ -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;
                }
index 377a4020def0ea77192131fbad3b657973d8da25..fde43c2b503ccda3b856f5fe2adbc4303174c376 100644 (file)
@@ -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());
index 876ddbeef5785d7ecb4d0097454c22ba35c96f00..334e54c2079c434130d6957d3440e6aed15992da 100644 (file)
@@ -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;
index c025012ea73c148f6f8dff2f5f0075a4153de258..619818576bc9750a7cc925b441252e753f0745b6 100644 (file)
@@ -54,7 +54,7 @@ public:
        bool Complete;
 
        String RequestMethod;
-       Url::Ptr Url;
+       Url::Ptr RequestUrl;
        HttpVersion ProtocolVersion;
 
        Dictionary::Ptr Headers;