Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-77674

QDiskNetworkCache sensitive to location in Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12.1
    • Network: Cache
    • None
    • Android 8
    • Android

    Description

      On Android, if the location given to QDiskNetworkCache::

      setCacheDirectory contains a '.', we get stale pages returned. 

       dk->setCacheDirectory(QStandardPaths::writableLocation (QStandardPaths::CacheLocation) + "/.httpCache");

      The same code works on Linux desktop.

      The test app has a hard coded URL, you will need to point to a file on a server that you can change. I used Apache2.

      Build the app and deploy to Android.

      Click "fetch"

      The first line of the returned file will be displayed.

      Modify the first line of file on the server

      Click "fetch" again.

      Note: the message has not changed.

       

      I think, even if this is an Android issue, the cache should not return stale data, if it is unsure it should re-request it. 

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            cnn Qt Core & Network
            nethers David Netherwood
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes