Closed sidrao2006 closed 3 years ago
If eTag is returned by the server, if-none-match header is added on subsequent requests which -
if-none-match
if-none-match header is not added when the target platform is web. The browser handles this for us.
CacheManager
downloadFile
Browser Error Logs
Platform:
🐛 Bug Report
If eTag is returned by the server,
if-none-match
header is added on subsequent requests which -Expected behavior
if-none-match
header is not added when the target platform is web. The browser handles this for us.Reproduction steps
CacheManager
. CalldownloadFile
twice using the same instance.if-none-match
header is passed.Logs
``` Error: XMLHttpRequest error. C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 909:28 get current packages/http/src/browser_client.dart 71:22Browser Error Logs
Configuration
Platform:
Dependency info
``` - flutter_cache_manager 3.0.2 - clock ^1.1.0 - collection ^1.15.0 - file >=6.0.0 <7.0.0 - flutter any - http ^0.13.0 - image ^3.0.1 - path ^1.8.0 - path_provider ^2.0.0 - pedantic ^1.10.0 - rxdart >=0.26.0 <0.28.0 - sqflite ^2.0.0+3 - uuid ^3.0.0 ```Flutter doctor report
``` [√] Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version 10.0.19043.985], locale en-US) • Flutter version 2.2.0 at C:\Users\Aneesh\flutter • Framework revision b22742018b (6 days ago), 2021-05-14 19:12:57 -0700 • Engine revision a9d88a4d18 • Dart version 2.13.0 [√] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc4) • Android SDK at C:\Users\Aneesh\AppData\Local\Android\Sdk • Platform android-S, build-tools 31.0.0-rc4 • ANDROID_SDK_ROOT = C:\Users\Aneesh\AppData\Local\Android\Sdk • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.4) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community • Visual Studio Community 2019 version 16.9.31205.134 • Windows 10 SDK version 10.0.19041.0 [√] Android Studio (version 4.1.0) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) [√] VS Code (version 1.56.2) • VS Code at C:\Users\Aneesh\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.22.0 [√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19043.985] • Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.212 • Edge (web) • edge • web-javascript • Microsoft Edge 90.0.818.62 • No issues found! ```