fetch with HTTP/1.1

This commit is contained in:
Kill Your TV 2014-12-22 18:01:59 +00:00
parent 1e87aedbb8
commit 42075e74ad
3 changed files with 13 additions and 13 deletions

View file

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