summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/apt/cfnetwork.diff10
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);