1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 04:04:16 +00:00

rolled back to HTTP 1.0 since chunked is not implemented

This commit is contained in:
orignal 2014-12-22 16:10:32 -05:00
parent bb5e520a79
commit b1b72d2d33
2 changed files with 3 additions and 3 deletions

View File

@ -373,7 +373,7 @@ namespace client
{ {
std::stringstream request, response; std::stringstream request, response;
// standard header // standard header
request << "GET " << u.path_ << " HTTP/1.1\r\nHost: " << u.host_ request << "GET " << u.path_ << " HTTP/1.0\r\nHost: " << u.host_
<< "\r\nAccept: */*\r\n" << "User-Agent: Wget/1.11.4\r\n" << "Connection: close\r\n"; << "\r\nAccept: */*\r\n" << "User-Agent: Wget/1.11.4\r\n" << "Connection: close\r\n";
if (m_Etag.length () > 0) // etag if (m_Etag.length () > 0) // etag
request << HTTP_FIELD_ETAG << ": " << m_Etag << "\r\n"; request << HTTP_FIELD_ETAG << ": " << m_Etag << "\r\n";

View File

@ -239,7 +239,7 @@ namespace http
if (site) if (site)
{ {
// User-Agent is needed to get the server list routerInfo files. // User-Agent is needed to get the server list routerInfo files.
site << "GET " << u.path_ << " HTTP/1.1\r\nHost: " << u.host_ site << "GET " << u.path_ << " HTTP/1.0\r\nHost: " << u.host_
<< "\r\nAccept: */*\r\n" << "User-Agent: Wget/1.11.4\r\n" << "Connection: close\r\n\r\n"; << "\r\nAccept: */*\r\n" << "User-Agent: Wget/1.11.4\r\n" << "Connection: close\r\n\r\n";
// read response // read response
std::string version, statusMessage; std::string version, statusMessage;
@ -291,7 +291,7 @@ namespace http
{ {
i2p::util::http::url u(address); i2p::util::http::url u(address);
std::stringstream ss; std::stringstream ss;
ss << "GET " << address << " HTTP/1.1" << std::endl; ss << "GET " << address << " HTTP/1.0" << std::endl;
ss << "Host: " << u.host_ << std::endl; ss << "Host: " << u.host_ << std::endl;
ss << "Accept: */*" << std::endl; ss << "Accept: */*" << std::endl;
ss << "User - Agent: Wget / 1.11.4" << std::endl; ss << "User - Agent: Wget / 1.11.4" << std::endl;