mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
fixed malformed messages
This commit is contained in:
parent
86fdd48229
commit
b2e7a53629
2 changed files with 7 additions and 11 deletions
|
@ -63,15 +63,11 @@ namespace proxy
|
|||
request r;
|
||||
ExtractRequest(r);
|
||||
parseHeaders(m_Buffer, r.headers);
|
||||
size_t len = 0;
|
||||
const char * data = strstr (m_Buffer, "\r\n\r\n");
|
||||
if (data)
|
||||
{
|
||||
data += 4;
|
||||
len = strlen (m_Buffer) - (data - m_Buffer);
|
||||
}
|
||||
if (data) data += 4;
|
||||
|
||||
LogPrint("Requesting ", r.host, " with path ", r.uri, " and method ", r.method);
|
||||
HandleDestinationRequest(r.host, r.method, len > 0 ? std::string (data, len) : "" , r.uri);
|
||||
HandleDestinationRequest(r.host, r.method, data ? std::string (data) : "" , r.uri);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue