Changeset 414

Show
Ignore:
Timestamp:
08/04/08 19:17:50 (4 months ago)
Author:
saurik
Message:

Fixed URLs with +'s not downloading from CDN.

Files:
1 modified

Legend:

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

    r406 r414  
    7474 int HttpMethod::FailFd = -1; 
    7575 time_t HttpMethod::FailTime = 0; 
    76 @@ -1062,159 +1117,249 @@ 
     76@@ -1062,159 +1117,257 @@ 
    7777  
    7878       if (Queue == 0) 
     
    153153+      std::string urs = uri; 
    154154+ 
     155+      for (;;) { 
     156+         size_t bad = urs.find_first_of("+"); 
     157+         if (bad == std::string::npos) 
     158+            break; 
     159+         // XXX: generalize 
     160+         urs = urs.substr(0, bad) + "%2b" + urs.substr(bad + 1); 
     161+      } 
     162+ 
    155163+      CFStringRef sr = CFStringCreateWithCString(kCFAllocatorDefault, urs.c_str(), se); 
    156164+      CFURLRef ur = CFURLCreateWithString(kCFAllocatorDefault, sr, NULL);