parse-community / Parse-SDK-iOS-OSX

The Apple SDK for Parse Platform (iOS, macOS, watchOS, tvOS)
https://parseplatform.org
Other
2.81k stars 865 forks source link

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

Open kassiansun opened 6 months ago

kassiansun commented 6 months ago

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

Server

Database

Logs

parse-github-assistant[bot] commented 6 months ago

Thanks for opening this issue!

kassiansun commented 6 months ago

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