From 6832e93963a7accfe14fd8d0b933c5cae0fc9be0 Mon Sep 17 00:00:00 2001 From: Phitherek Date: Sun, 16 Sep 2012 01:28:40 +0200 Subject: [PATCH] fixed HTTP request issue, now works with hostings and subdomains etc. --- 3m.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3m.cpp b/3m.cpp index dce673f..56d5ef2 100644 --- a/3m.cpp +++ b/3m.cpp @@ -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) {