Skip to content

Commit

Permalink
Drop old C++ standard (#73)
Browse files Browse the repository at this point in the history
* Add patch for new log4cxx

* encode spaces for compatibility with CURL 7.78+ (#1)

---------

Co-authored-by: Leopold Palomo-Avellaneda <[email protected]>
Co-authored-by: Simon Schmeisser <[email protected]>
  • Loading branch information
3 people authored Apr 12, 2024
1 parent 65b0d22 commit 59afd3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
cmake_minimum_required(VERSION 3.0.2)
project(resource_retriever)

set_directory_properties(PROPERTIES COMPILE_OPTIONS "-std=c++11")

find_package(catkin REQUIRED COMPONENTS rosconsole roslib)

find_package(Boost REQUIRED)
Expand Down
5 changes: 5 additions & 0 deletions src/retriever.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

#include <curl/curl.h>

#include <regex>

namespace resource_retriever
{

Expand Down Expand Up @@ -118,6 +120,9 @@ MemoryResource Retriever::get(const std::string& url)

mod_url = "file://" + package_path + mod_url;
}

//newer versions of curl do not accept spaces in URLs
mod_url = std::regex_replace(mod_url, std::regex(" "), "%20");

curl_easy_setopt(curl_handle_, CURLOPT_URL, mod_url.c_str());
curl_easy_setopt(curl_handle_, CURLOPT_WRITEFUNCTION, curlWriteFunc);
Expand Down

0 comments on commit 59afd3b

Please sign in to comment.