[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#762160: apt: [regression] 406 Not acceptable errors



On Fri, Sep 19, 2014 at 01:31:04PM +0800, Paul Wise wrote:
> The recent apt security updates broke the Debian derivatives census
> scripts, various sites now return "406 Not acceptable" errors.
> 
> The set of instructions below produces the errors on the second apt-get
> update run with apt 0.9.7.9+deb7u4 but not with apt 0.9.7.9+deb7u2.

This patch should fix it, if you could double check, that would be
great. I'm also curious if your second bugreport is fixed with this too:

"""
diff --git a/methods/copy.cc b/methods/copy.cc
index 5570f31..b78053d 100644
--- a/methods/copy.cc
+++ b/methods/copy.cc
@@ -55,8 +55,8 @@ void CopyMethod::CalculateHashes(FetchResult &Res)
 /* */
 bool CopyMethod::Fetch(FetchItem *Itm)
 {
-   URI Get = Itm->Uri;
-   std::string File = Get.Path;
+   // this ensures that relative paths work in copy
+   std::string File = Itm->Uri.substr(Itm->Uri.find(':')+1);
 
    // Stat the file and send a start message
    struct stat Buf;
"""
 
Thanks,
 Michael


Reply to: