# HG changeset patch # User Chris Cannam # Date 1195132765 0 # Node ID 5cd7f6d10d47eb63e3c9175ae14bbe688e1a681d # Parent aa8dbac62024479b4dd326103d6943905026affc * Fix mishandling of encoded urls diff -r aa8dbac62024 -r 5cd7f6d10d47 data/fileio/FileSource.cpp --- a/data/fileio/FileSource.cpp Sun Nov 11 20:31:12 2007 +0000 +++ b/data/fileio/FileSource.cpp Thu Nov 15 13:19:25 2007 +0000 @@ -77,6 +77,7 @@ waitForStatus(); if (!isAvailable()) { + // The URL was created on the assumption that the string // was human-readable. Let's try again, this time // assuming it was already encoded. @@ -85,7 +86,19 @@ << "\" as human-readable URL; " << "trying again treating it as encoded URL" << std::endl; + + // even though our cache file doesn't exist (because the + // resource was 404), we still need to ensure we're no + // longer associating a filename with this url in the + // refcount map -- or createCacheFile will think we've + // already done all the work and no request will be sent + deleteCacheFile(); + m_url.setEncodedUrl(fileOrUrl.toAscii()); + + m_ok = false; + m_done = false; + m_lastStatus = 0; init(showProgress); } }