GCC Version-dependent compile flags

This commit is contained in:
Robin Davies
2022-04-23 09:25:36 -04:00
parent 604bf2cdbe
commit 917d96def2
2 changed files with 11 additions and 2 deletions
+10 -1
View File
@@ -16,6 +16,7 @@
#include "Lv2Log.hpp" #include "Lv2Log.hpp"
#include <set> #include <set>
#include <strings.h> #include <strings.h>
#include "Ipv6Helpers.hpp"
#include "BeastServer.hpp" #include "BeastServer.hpp"
@@ -275,6 +276,7 @@ namespace pipedal
m_sessions.erase(session); m_sessions.erase(session);
m_connections.erase(hConnection); m_connections.erase(hConnection);
} }
void NotFound(server::connection_type &connection, const std::string &filename) void NotFound(server::connection_type &connection, const std::string &filename)
{ {
// 404 error // 404 error
@@ -368,6 +370,7 @@ namespace pipedal
} }
return result.str(); return result.str();
} }
void on_http(connection_hdl hdl) void on_http(connection_hdl hdl)
{ {
// Upgrade our connection handle to a full connection_ptr // Upgrade our connection handle to a full connection_ptr
@@ -397,6 +400,9 @@ namespace pipedal
return; return;
} }
std::string fromAddress = SS(con->get_remote_endpoint());
if (req.method() == HttpVerb::options) if (req.method() == HttpVerb::options)
{ {
res.set(HttpField::access_control_allow_origin, origin); res.set(HttpField::access_control_allow_origin, origin);
@@ -412,10 +418,13 @@ namespace pipedal
if (requestHandler->wants(req.method(), requestUri)) if (requestHandler->wants(req.method(), requestUri))
{ {
std::string fromAddress = SS(con->get_remote_endpoint());
try try
{ {
if (req.method() == HttpVerb::head) if (req.method() == HttpVerb::head)
{ {
std::error_code ec; std::error_code ec;