]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-worker.cc
* [ABI break] merge support for http redirects, thanks to
[apt.git] / apt-pkg / acquire-worker.cc
index 1a754dae905cd3f8aa6e49076ed07c7098be3e65..78c68737c32f4d3aef1a37de6314e6b4cfd4d3e8 100644 (file)
@@ -220,6 +220,20 @@ bool pkgAcquire::Worker::RunMessages()
         Status = LookupTag(Message,"Message");
         break;
            
+         // 103 Redirect
+         case 103:
+         {
+            if (Itm == 0)
+            {
+               _error->Error("Method gave invalid 103 Redirect message");
+               break;
+            }
+            string NewURI = LookupTag(Message,"New-URI",URI.c_str());
+            Itm->URI = NewURI;
+            break;
+         }
+   
         // 200 URI Start
         case 200:
         {