diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-07-04 15:27:10 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-07-17 14:00:03 +0000 |
| commit | cb8e2a5ae27aa34f2a9ad21469538403274e3b3e (patch) | |
| tree | 249a879f30f2bcf7e6ad38c66dad135e8d22c747 /internal/test | |
| parent | 895112235b9239d8db9f129451605e1e8b9c2a12 (diff) | |
Discovery: Implement conditional requests
From docs.eduvpn.org (https://docs.eduvpn.org/server/v3/server-discovery.html):
When fetching the new JSON files, the client SHOULD use conditional requests, so the file is only fetched in case there were changes. This, in order to reduce the amount of traffic required by VPN clients, especially relevant for metered, or slow connections.
The If-Modified-Since request header SHOULD be used for this. If the response code is 304, the file hasn’t changed since. The value to use for the If-Modified-Since request header is the exact value of the Last-Modified response header for the last successful download, i.e. 200 response. You SHOULD store the value of Last-Modified and use it as-is for the If-Modified-Since header.
Diffstat (limited to 'internal/test')
0 files changed, 0 insertions, 0 deletions
