Parse-SDK-iOS-OSX
Parse-SDK-iOS-OSX copied to clipboard
Parse SDK doesn't obey `ETag` header from express server
New Issue Checklist
- [x] I am not disclosing a vulnerability.
- [x] I am not just asking a question.
- [x] I have searched through existing issues.
- [x] I can reproduce the issue with the latest versions of Parse Server and the Parse ObjC SDK.
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
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