mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-18 23:36:39 +01:00
* http proxy : fix converted request (#508)
This commit is contained in:
parent
aa6bc8042a
commit
2628426084
1 changed files with 6 additions and 0 deletions
|
@ -189,6 +189,12 @@ namespace proxy {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SanitizeHTTPRequest(req);
|
SanitizeHTTPRequest(req);
|
||||||
|
/* convert proxy-style http req to ordinary one: */
|
||||||
|
/* 1) replace Host header, 2) make relative url */
|
||||||
|
req.add_header("Host", url.host, true);
|
||||||
|
url.schema = "";
|
||||||
|
url.host = "";
|
||||||
|
req.uri = url.to_string();
|
||||||
|
|
||||||
/* drop original request from input buffer */
|
/* drop original request from input buffer */
|
||||||
m_recv_buf.erase(m_recv_buf.begin(), m_recv_buf.begin() + req_len);
|
m_recv_buf.erase(m_recv_buf.begin(), m_recv_buf.begin() + req_len);
|
||||||
|
|
Loading…
Add table
Reference in a new issue