mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 08:14:15 +00:00
* sane log messages: HTTPServer.cpp
This commit is contained in:
parent
3b5d9d6cee
commit
89e3178ea3
@ -597,7 +597,7 @@ namespace util
|
|||||||
{
|
{
|
||||||
end = str.find ('&', pos);
|
end = str.find ('&', pos);
|
||||||
std::string param = str.substr (pos, end - pos);
|
std::string param = str.substr (pos, end - pos);
|
||||||
LogPrint (param);
|
LogPrint (eLogDebug, "HTTPServer: extracted parameters: ", param);
|
||||||
size_t e = param.find ('=');
|
size_t e = param.find ('=');
|
||||||
if (e != std::string::npos)
|
if (e != std::string::npos)
|
||||||
params[param.substr(0, e)] = param.substr(e+1);
|
params[param.substr(0, e)] = param.substr(e+1);
|
||||||
@ -968,7 +968,7 @@ namespace util
|
|||||||
void HTTPConnection::HandleDestinationRequest (const std::string& address, const std::string& uri)
|
void HTTPConnection::HandleDestinationRequest (const std::string& address, const std::string& uri)
|
||||||
{
|
{
|
||||||
std::string request = "GET " + uri + " HTTP/1.1\r\nHost:" + address + "\r\n\r\n";
|
std::string request = "GET " + uri + " HTTP/1.1\r\nHost:" + address + "\r\n\r\n";
|
||||||
LogPrint("HTTP Client Request: ", request);
|
LogPrint(eLogDebug, "HTTPServer: client request: ", request);
|
||||||
SendToAddress (address, 80, request.c_str (), request.size ());
|
SendToAddress (address, 80, request.c_str (), request.size ());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -977,7 +977,7 @@ namespace util
|
|||||||
i2p::data::IdentHash destination;
|
i2p::data::IdentHash destination;
|
||||||
if (!i2p::client::context.GetAddressBook ().GetIdentHash (address, destination))
|
if (!i2p::client::context.GetAddressBook ().GetIdentHash (address, destination))
|
||||||
{
|
{
|
||||||
LogPrint ("Unknown address ", address);
|
LogPrint (eLogWarning, "HTTPServer: Unknown address ", address);
|
||||||
SendReply ("<html>" + itoopieImage + "<br>Unknown address " + address + "</html>", 404);
|
SendReply ("<html>" + itoopieImage + "<br>Unknown address " + address + "</html>", 404);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user