mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
send original user's request through the proxy
This commit is contained in:
parent
0f0110d6a0
commit
52fddadc98
3 changed files with 28 additions and 58 deletions
|
@ -63,14 +63,8 @@ namespace proxy
|
|||
request r;
|
||||
ExtractRequest(r);
|
||||
parseHeaders(m_Buffer, r.headers);
|
||||
const char * data = nullptr;
|
||||
if (r.method == "POST")
|
||||
{
|
||||
data = strstr (m_Buffer, "\r\n\r\n");
|
||||
if (data) data += 4;
|
||||
}
|
||||
LogPrint("Requesting ", r.host, " with path ", r.uri, " and method ", r.method);
|
||||
HandleDestinationRequest(r.host, r.method, data ? std::string (data) : "" , r.uri);
|
||||
SendToAddress (r.host, m_Buffer, m_BufferLen);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue