Show
Ignore:
Timestamp:
07/29/08 19:45:38 (5 months ago)
Author:
saurik
Message:

Removed weird dns fix/hack from APT.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/data/apt/cfnetwork.diff

    r277 r402  
    7474 int HttpMethod::FailFd = -1; 
    7575 time_t HttpMethod::FailTime = 0; 
    76 @@ -1062,159 +1117,266 @@ 
     76@@ -1062,159 +1117,249 @@ 
    7777  
    7878       if (Queue == 0) 
     
    151151+      std::string hs = uri.Host; 
    152152+ 
    153 +#if __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ >= 10200 
    154 +      struct hostent *he = gethostbyname(hs.c_str()); 
    155 +      if (he == NULL || he->h_addr_list[0] == NULL) { 
    156 +         _error->Error(hstrerror(h_errno)); 
    157 +         Fail(true); 
    158 +         free(url); 
    159 +      } 
    160 + 
    161 +      uri.Host = inet_ntoa(* (struct in_addr *) he->h_addr_list[0]); 
    162 +#endif 
    163 + 
    164153+      std::string urs = uri; 
    165154+ 
     
    197186+ 
    198187+      CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("User-Agent"), CFSTR("Telesphoreo APT-HTTP/1.0.98")); 
    199 + 
    200 +#if __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ >= 10200 
    201 +      sr = CFStringCreateWithCString(kCFAllocatorDefault, hs.c_str(), se); 
    202 +      CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("Host"), sr); 
    203 +      CFRelease(sr); 
    204 +#endif 
    205188+ 
    206189+      CFReadStreamRef rs = CFReadStreamCreateForHTTPRequest(kCFAllocatorDefault, hm);