From 269e79647f0e8a449fc16d42c5d26f7fd1d2df73 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 9 Jul 2015 17:32:19 +0200 Subject: [PATCH] Rename HttpRequest.Url to HttpRequest.RequestUrl Otherwise gcc will break with the Url class, clang works. refs #9447 --- lib/remote/httpchunkedencoding.cpp | 2 +- lib/remote/httphandler.cpp | 4 ++-- lib/remote/httprequest.cpp | 4 ++-- lib/remote/httprequest.hpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/remote/httpchunkedencoding.cpp b/lib/remote/httpchunkedencoding.cpp index 81b815c70..4d8aa7ca8 100644 --- a/lib/remote/httpchunkedencoding.cpp +++ b/lib/remote/httpchunkedencoding.cpp @@ -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; } diff --git a/lib/remote/httphandler.cpp b/lib/remote/httphandler.cpp index 377a4020d..fde43c2b5 100644 --- a/lib/remote/httphandler.cpp +++ b/lib/remote/httphandler.cpp @@ -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 = "

Not found

"; response.WriteBody(msg.CStr(), msg.GetLength()); diff --git a/lib/remote/httprequest.cpp b/lib/remote/httprequest.cpp index 876ddbeef..334e54c20 100644 --- a/lib/remote/httprequest.cpp +++ b/lib/remote/httprequest.cpp @@ -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; diff --git a/lib/remote/httprequest.hpp b/lib/remote/httprequest.hpp index c025012ea..619818576 100644 --- a/lib/remote/httprequest.hpp +++ b/lib/remote/httprequest.hpp @@ -54,7 +54,7 @@ public: bool Complete; String RequestMethod; - Url::Ptr Url; + Url::Ptr RequestUrl; HttpVersion ProtocolVersion; Dictionary::Ptr Headers; -- 2.50.1