]> git.saurik.com Git - apt-legacy.git/blobdiff - methods/http.cc.orig
Added support for 301 redirects to the new APT Apple HTTP method.
[apt-legacy.git] / methods / http.cc.orig
index 27454b97b8cd825a3d3608e6278d7c562833de7e..0f01d38b412ea2e6bf91a2869d14ad355b61033c 100644 (file)
@@ -1192,7 +1192,7 @@ int HttpMethod::Loop()
       hm = (CFHTTPMessageRef) CFReadStreamCopyProperty(rs, kCFStreamPropertyHTTPResponseHeader);
       sc = CFHTTPMessageGetResponseStatusCode(hm);
 
-      if (sc == 302) {
+      if (sc == 301 || sc == 302) {
          sr = CFHTTPMessageCopyHeaderFieldValue(hm, CFSTR("Location"));
          if (sr == NULL) {
             Fail();