fixed HTTP request issue, now works with hostings and subdomains etc.
parent
0f90e1b979
commit
6832e93963
4
3m.cpp
4
3m.cpp
|
@ -448,7 +448,7 @@ int status;
|
||||||
cout << "Sending HTTP GET request..." << endl;
|
cout << "Sending HTTP GET request..." << endl;
|
||||||
string req = "";
|
string req = "";
|
||||||
stringstream sreq;
|
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();
|
req = sreq.str();
|
||||||
status = send(remote, req.c_str(), req.length(), 0);
|
status = send(remote, req.c_str(), req.length(), 0);
|
||||||
if(status == -1) {
|
if(status == -1) {
|
||||||
|
@ -607,7 +607,7 @@ int status;
|
||||||
cout << "Sending HTTP GET request..." << endl;
|
cout << "Sending HTTP GET request..." << endl;
|
||||||
string req = "";
|
string req = "";
|
||||||
stringstream sreq;
|
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();
|
req = sreq.str();
|
||||||
status = send(remote, req.c_str(), req.length(), 0);
|
status = send(remote, req.c_str(), req.length(), 0);
|
||||||
if(status == -1) {
|
if(status == -1) {
|
||||||
|
|
Loading…
Reference in New Issue