diff options
author | Jay Freeman <saurik@saurik.com> | 2008-08-04 19:17:50 +0000 |
---|---|---|
committer | Jay Freeman <saurik@saurik.com> | 2008-08-04 19:17:50 +0000 |
commit | d16fae55a51f98ea73ac70c83670fb1ccf18bb77 (patch) | |
tree | 28a9e819d8b434d88859a40f727dca0a9fd4a6eb /data | |
parent | 5223c578d9632b9faf88621728ae22787bed177f (diff) |
Fixed URLs with +'s not downloading from CDN.
git-svn-id: http://svn.telesphoreo.org/trunk@414 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data')
-rw-r--r-- | data/apt/cfnetwork.diff | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/data/apt/cfnetwork.diff b/data/apt/cfnetwork.diff index f4c170084..3f865b154 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,249 @@ +@@ -1062,159 +1117,257 @@ if (Queue == 0) continue; @@ -152,6 +152,14 @@ diff -ru apt-0.6.46.4.1/methods/http.cc apt-0.6.46.4.1+iPhone/methods/http.cc + + std::string urs = uri; + ++ for (;;) { ++ size_t bad = urs.find_first_of("+"); ++ if (bad == std::string::npos) ++ break; ++ // XXX: generalize ++ urs = urs.substr(0, bad) + "%2b" + urs.substr(bad + 1); ++ } ++ + CFStringRef sr = CFStringCreateWithCString(kCFAllocatorDefault, urs.c_str(), se); + CFURLRef ur = CFURLCreateWithString(kCFAllocatorDefault, sr, NULL); + CFRelease(sr); |