]> git.saurik.com Git - apt-legacy.git/commitdiff
Removed weird dns fix/hack from APT.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 29 Jul 2008 19:45:38 +0000 (19:45 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 29 Jul 2008 19:45:38 +0000 (19:45 +0000)
M cfnetwork.diff

git-svn-id: http://svn.telesphoreo.org/trunk@402 514c082c-b64e-11dc-b46d-3d985efe055d

methods/http.cc
methods/http.cc.orig

index 2819ae165a61c508d1b28db5dae44e96e0558f3c..1a7e7c95827552187be702f375145d42d40b6272 100644 (file)
@@ -1125,17 +1125,6 @@ int HttpMethod::Loop()
       URI uri = std::string(url);
       std::string hs = uri.Host;
 
-#if __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ >= 10200
-      struct hostent *he = gethostbyname(hs.c_str());
-      if (he == NULL || he->h_addr_list[0] == NULL) {
-         _error->Error(hstrerror(h_errno));
-         Fail(true);
-         free(url);
-      }
-
-      uri.Host = inet_ntoa(* (struct in_addr *) he->h_addr_list[0]);
-#endif
-
       std::string urs = uri;
 
       CFStringRef sr = CFStringCreateWithCString(kCFAllocatorDefault, urs.c_str(), se);
@@ -1172,12 +1161,6 @@ int HttpMethod::Loop()
 
       CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("User-Agent"), CFSTR("Telesphoreo APT-HTTP/1.0.98"));
 
-#if __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ >= 10200
-      sr = CFStringCreateWithCString(kCFAllocatorDefault, hs.c_str(), se);
-      CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("Host"), sr);
-      CFRelease(sr);
-#endif
-
       CFReadStreamRef rs = CFReadStreamCreateForHTTPRequest(kCFAllocatorDefault, hm);
       CFRelease(hm);
 
index 5e87631ee49280150ddac34b9e3d4be75e8ab277..10f1ae0ec8917d61101ceab70cdf6372e89e322b 100644 (file)
@@ -1121,17 +1121,6 @@ int HttpMethod::Loop()
       URI uri = std::string(url);
       std::string hs = uri.Host;
 
-#if __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ >= 10200
-      struct hostent *he = gethostbyname(hs.c_str());
-      if (he == NULL || he->h_addr_list[0] == NULL) {
-         _error->Error(hstrerror(h_errno));
-         Fail(true);
-         free(url);
-      }
-
-      uri.Host = inet_ntoa(* (struct in_addr *) he->h_addr_list[0]);
-#endif
-
       std::string urs = uri;
 
       CFStringRef sr = CFStringCreateWithCString(kCFAllocatorDefault, urs.c_str(), se);
@@ -1168,12 +1157,6 @@ int HttpMethod::Loop()
 
       CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("User-Agent"), CFSTR("Telesphoreo APT-HTTP/1.0.98"));
 
-#if __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ >= 10200
-      sr = CFStringCreateWithCString(kCFAllocatorDefault, hs.c_str(), se);
-      CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("Host"), sr);
-      CFRelease(sr);
-#endif
-
       CFReadStreamRef rs = CFReadStreamCreateForHTTPRequest(kCFAllocatorDefault, hm);
       CFRelease(hm);