summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpixel <pixel>2007-04-11 09:46:43 +0000
committerpixel <pixel>2007-04-11 09:46:43 +0000
commit4426cc475432ec0879acaf2d5745e76a50649ee3 (patch)
treee8b23605a981d226af2e6af5d4fbf798543b81e0 /lib
parent5f5be5d1e78ef0a95bc7ea66103c8d3cc35bcec1 (diff)
Inverting the notion of fakehost in HttpClient.
Diffstat (limited to 'lib')
-rw-r--r--lib/HttpClient.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/HttpClient.cc b/lib/HttpClient.cc
index b0e9041..dedd23a 100644
--- a/lib/HttpClient.cc
+++ b/lib/HttpClient.cc
@@ -9,7 +9,7 @@ HttpClient::HttpClient(const String & _url, Handle * _out, const String & _fake_
DecodeURL();
Client.SetNonBlock();
- Client.Connect(host, 80);
+ Client.Connect(fake_host == "" ? host : fake_host, 80);
if (Client.IsConnected()) {
SetBurst();
@@ -40,7 +40,7 @@ int HttpClient::Do() throw (GeneralException) {
case 1:
b << "GET " + uri + " HTTP/1.1\r\n"
- "Host: " + (fake_host == "" ? host : fake_host) + "\r\n"
+ "Host: " + host + "\r\n"
"Connection: close\r\n";
for (i = headers.begin(); i != headers.end(); i++) {