mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
fix outproxy
This commit is contained in:
parent
f168e4586c
commit
01da9e3ca2
5 changed files with 109 additions and 77 deletions
17
HTTP.cpp
17
HTTP.cpp
|
@ -259,16 +259,21 @@ namespace http {
|
|||
return eoh + strlen(HTTP_EOH);
|
||||
}
|
||||
|
||||
std::string HTTPReq::to_string() {
|
||||
std::stringstream ss;
|
||||
ss << method << " " << uri << " " << version << CRLF;
|
||||
void HTTPReq::write(std::ostream & o) {
|
||||
o << method << " " << uri << " " << version << CRLF;
|
||||
for (auto & h : headers) {
|
||||
ss << h.first << ": " << h.second << CRLF;
|
||||
o << h.first << ": " << h.second << CRLF;
|
||||
}
|
||||
ss << CRLF;
|
||||
return ss.str();
|
||||
o << CRLF;
|
||||
}
|
||||
|
||||
std::string HTTPReq::to_string()
|
||||
{
|
||||
std::stringstream ss;
|
||||
write(ss);
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
bool HTTPRes::is_chunked() {
|
||||
auto it = headers.find("Transfer-Encoding");
|
||||
if (it == headers.end())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue