mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-08-27 22:35:02 +00:00
pass port to Host: header if specified in original request
This commit is contained in:
@@ -510,7 +510,11 @@ namespace proxy
|
||||
{
|
||||
auto b32Host = addr->ToBase32 ();
|
||||
if (!b32Host.empty ())
|
||||
m_ClientRequest.UpdateHeader("Host", b32Host + ".b32.i2p"); // replace our name to .b32.i2p address
|
||||
{
|
||||
b32Host += ".b32.i2p";
|
||||
if (m_RequestURL.port) b32Host += ":" + std::to_string(m_RequestURL.port);
|
||||
m_ClientRequest.UpdateHeader("Host", b32Host); // replace our name to .b32.i2p address
|
||||
}
|
||||
else
|
||||
{
|
||||
// invaild address
|
||||
|
||||
Reference in New Issue
Block a user