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

QNetworkRequest::SourceIsFromCacheAttribute doesn't return proper value when cache expire

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.5.1
    • Fix Version/s: None
    • Component/s: Network: Cache
    • Labels:
      None

      Description

      When the expirationDate on a url cache expire, on the subsequent request, the QNetworkRequest::SourceIsFromCacheAttribute is set to true, even if the cache was expired and a network call was required.

      How to reproduce:
      1) Create a http request and set the expirationDate to be a specific time (ie: 20seconds).
      2) Wait until the 20seconds pass and try to make the same request (with the same url)

      Expected result:

      • The QNetworkRequest::SourceIsFromCacheAttribute should be set to false, since the data came from the network (and not from the cache)

      Actual result:

      • The QNetworkRequest::SourceIsFromCacheAttribute is set to true.

        Attachments

        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:
            jbisson Jonathan Bisson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes