diff options
author | Jay Freeman <saurik@saurik.com> | 2008-07-29 19:45:38 +0000 |
---|---|---|
committer | Jay Freeman <saurik@saurik.com> | 2008-07-29 19:45:38 +0000 |
commit | 3cfb442cb6b87ea25a8b3b7c3b5481387a1952c3 (patch) | |
tree | 5f30a57444164052d396aeb4b0843afb73c7b4c5 /data/apt | |
parent | ae6d263b64141ff8caca1cdca56a0b4629aa5c09 (diff) |
Removed weird dns fix/hack from APT.
git-svn-id: http://svn.telesphoreo.org/trunk@402 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/apt')
-rw-r--r-- | data/apt/cfnetwork.diff | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/data/apt/cfnetwork.diff b/data/apt/cfnetwork.diff index f233df383..672208e0e 100644 --- a/data/apt/cfnetwork.diff +++ b/data/apt/cfnetwork.diff @@ -73,7 +73,7 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc string HttpMethod::FailFile; int HttpMethod::FailFd = -1; time_t HttpMethod::FailTime = 0; -@@ -1062,159 +1117,266 @@ +@@ -1062,159 +1117,249 @@ if (Queue == 0) continue; @@ -150,17 +150,6 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc + 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); @@ -197,12 +186,6 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc + + 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); + |