fixed HTTP request issue, now works with hostings and subdomains etc.

master
Phitherek 2012-09-16 01:28:40 +02:00
parent 0f90e1b979
commit 6832e93963
1 changed files with 2 additions and 2 deletions

4
3m.cpp
View File

@ -448,7 +448,7 @@ int status;
cout << "Sending HTTP GET request..." << endl;
string req = "";
stringstream sreq;
sreq << "GET " << mld.modinfo << " HTTP/1.0\n\n";
sreq << "GET " << mld.modinfo << " HTTP/1.0\n" << "Host: " << mld.server << endl << endl;
req = sreq.str();
status = send(remote, req.c_str(), req.length(), 0);
if(status == -1) {
@ -607,7 +607,7 @@ int status;
cout << "Sending HTTP GET request..." << endl;
string req = "";
stringstream sreq;
sreq << "GET " << mld.path << " HTTP/1.0\n\n";
sreq << "GET " << mld.path << " HTTP/1.0\n" << "Host: " << mld.server << endl << endl;
req = sreq.str();
status = send(remote, req.c_str(), req.length(), 0);
if(status == -1) {