Parse-SDK-iOS-OSX icon indicating copy to clipboard operation
Parse-SDK-iOS-OSX copied to clipboard

Parse SDK doesn't obey `ETag` header from express server

Open kassiansun opened this issue 1 year ago • 2 comments

New Issue Checklist

Issue Description

Currently, parse-server will return ETag header for /parse/* requests, but the client is not caching it properly

Steps to reproduce

/parse/config returned ETag header, but the parse client is not sending If-None-Match along with the further requests to /parse/config

Actual Outcome

Expected Outcome

The client should obey the standard HTTP caching semantics, and re-use local cache if the ETag is consistent with remote version: https://www.rfc-editor.org/rfc/rfc9111.html

Environment

Client

  • Parse ObjC SDK version: 2.7

Server

  • Parse Server version: 5.6.0
  • Operating system: Ubuntu 22.04
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): AWS

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 5.0
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): AWS

Logs

kassiansun avatar Jan 04 '24 08:01 kassiansun

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

Here it says "for security reasons", is this still valid nowadays? The code was introduced at 2015: https://github.com/parse-community/Parse-SDK-iOS-OSX/blob/master/Parse/Parse/Internal/Commands/CommandRunner/URLSession/Session/PFURLSession.m#L261

kassiansun avatar Jan 04 '24 08:01 kassiansun