- cleanup broken downloads properly
     - ignore only the invalid regexp instead of all options
   * apt-pkg/acquire-item.h, apt-pkg/deb/debmetaindex.cc:
     - fix fetching language information by adding OptionalSubIndexTarget
     - ignore only the invalid regexp instead of all options
   * apt-pkg/acquire-item.h, apt-pkg/deb/debmetaindex.cc:
     - fix fetching language information by adding OptionalSubIndexTarget
+  * methods/https.cc:
+    - cleanup broken downloads properly
 
  -- Michael Vogt <mvo@debian.org>  Fri, 05 Aug 2011 10:57:08 +0200
 
 
  -- Michael Vogt <mvo@debian.org>  Fri, 05 Aug 2011 10:57:08 +0200
 
 
    long curl_servdate;
    curl_easy_getinfo(curl, CURLINFO_FILETIME, &curl_servdate);
 
    long curl_servdate;
    curl_easy_getinfo(curl, CURLINFO_FILETIME, &curl_servdate);
 
    // cleanup
    if(success != 0) 
    {
       _error->Error("%s", curl_errorstr);
    // cleanup
    if(success != 0) 
    {
       _error->Error("%s", curl_errorstr);
+      // unlink, no need keep 401/404 page content in partial/
+      unlink(File->Name().c_str());
 
    // Timestamp
    struct utimbuf UBuf;
 
    // Timestamp
    struct utimbuf UBuf;