From 4426cc475432ec0879acaf2d5745e76a50649ee3 Mon Sep 17 00:00:00 2001
From: pixel <pixel>
Date: Wed, 11 Apr 2007 09:46:43 +0000
Subject: Inverting the notion of fakehost in HttpClient.

---
 lib/HttpClient.cc | 4 ++--
 1 file 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++) {
-- 
cgit v1.2.3