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

QDiskNetworkCache sensitive to location in Android

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.1
    • Fix Version/s: None
    • Component/s: Network: Cache
    • Labels:
      None
    • Environment:
      Android 8
    • Platform/s:
      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

        1. CacheTest (1).tar.gz
          59 kB
          David Netherwood
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            cnn Qt Core & Network
            Reporter:
            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