Browse Source

* HTTPProxy: fix converted request (#508)

* I2PService: reword log message, to avoid ambiguity
pull/509/merge
hagen 9 years ago
parent
commit
aa764fbd1c
  1. 5
      HTTPProxy.cpp
  2. 2
      I2PService.cpp

5
HTTPProxy.cpp

@ -189,6 +189,9 @@ namespace proxy {
return true; return true;
} }
SanitizeHTTPRequest(req); SanitizeHTTPRequest(req);
std::string dest_host = url.host;
uint16_t dest_host = url.port;
/* convert proxy-style http req to ordinary one: */ /* convert proxy-style http req to ordinary one: */
/* 1) replace Host header, 2) make relative url */ /* 1) replace Host header, 2) make relative url */
req.add_header("Host", url.host, true); req.add_header("Host", url.host, true);
@ -206,7 +209,7 @@ namespace proxy {
/* connect to destination */ /* connect to destination */
GetOwner()->CreateStream (std::bind (&HTTPReqHandler::HandleStreamRequestComplete, GetOwner()->CreateStream (std::bind (&HTTPReqHandler::HandleStreamRequestComplete,
shared_from_this(), std::placeholders::_1), url.host, url.port); shared_from_this(), std::placeholders::_1), dest_host, dest_port);
return true; return true;
} }

2
I2PService.cpp

@ -27,7 +27,7 @@ namespace client
m_LocalDestination->CreateStream (streamRequestComplete, identHash, port); m_LocalDestination->CreateStream (streamRequestComplete, identHash, port);
else else
{ {
LogPrint (eLogWarning, "I2PService: Remote destination ", dest, " not found"); LogPrint (eLogWarning, "I2PService: Remote destination not found: ", dest);
streamRequestComplete (nullptr); streamRequestComplete (nullptr);
} }
} }

Loading…
Cancel
Save