Skip to content

Commit

Permalink
dont hardcode EXECUTABLE_OUTPUT_PATH to build, handle URLs with empty…
Browse files Browse the repository at this point in the history
… GET parameter correctly
  • Loading branch information
patrickbr committed Oct 9, 2023
1 parent f587e80 commit 761a197
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif()
enable_testing()

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/build")
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}")


find_package(OpenMP)
Expand Down Expand Up @@ -76,6 +76,6 @@ add_subdirectory(src)

# install target
install(
FILES build/qlever-mapui DESTINATION bin
FILES ${CMAKE_BINARY_DIR}/petrimaps DESTINATION bin
PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE
)
1 change: 1 addition & 0 deletions src/qlever-petrimaps/GeomCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,7 @@ void GeomCache::serializeToDisk(const std::string& fname) const {

// _____________________________________________________________________________
std::string GeomCache::requestIndexHash() {
std::cout << "HASH REQUEST" << std::endl;
CURLcode res;
char errbuf[CURL_ERROR_SIZE];
std::string response;
Expand Down
2 changes: 2 additions & 0 deletions src/qlever-petrimaps/server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,7 @@ std::string Server::parseUrl(std::string u, std::string pl,
auto kvs = util::split(parts[1], '&');
for (const auto& kv : kvs) {
auto kvp = util::split(kv, '=', 2);
if (kvp.size() == 0) continue;
if (kvp.size() == 1) kvp.push_back("");
(*params)[util::urlDecode(kvp[0])] = util::urlDecode(kvp[1]);
}
Expand All @@ -854,6 +855,7 @@ std::string Server::parseUrl(std::string u, std::string pl,
auto kvs = util::split(pl, '&');
for (const auto& kv : kvs) {
auto kvp = util::split(kv, '=', 2);
if (kvp.size() == 0) continue;
if (kvp.size() == 1) kvp.push_back("");
(*params)[util::urlDecode(kvp[0])] = util::urlDecode(kvp[1]);
}
Expand Down

0 comments on commit 761a197

Please sign in to comment.