Skip to content

WebCal export : Support for HTTP header If-Modified-Since #29309

@relikd

Description

@relikd

Is your feature request related to a problem? Please describe.

Hi there, it seems the caldav integration does ignore basic caching mechanisms. The server always responds with:

HTTP/1.1 200 OK
Date: Mon, 18 Oct 2021 21:38:04 GMT

(which is the current date and time)

This makes all attempts to set the If-Modified-Since header impossible.

GET /remote.php/dav/public-calendars/XXX?export HTTP/1.1
If-Modified-Since: Mon, 18 Oct 2021 21:38:04 GMT
...

The calendar will be downloaded regardless if it has any changes or not.
This is especially data-consuming if you want to sync a calendar every 5 minutes.

Describe the solution you'd like

Instead, the calendar app could return the date of the last modification and respect the If-Modified-Since header and return a HTTP 304 status code. That way no unnecessary data is transmitted.

Describe alternatives you've considered
N/A

Additional context
Use Case scenario: A mirrored ical file that is downloaded every 5 minutes to a different server. It is crucial to reflects recent changes as soon as possible and yet don't download the ical 288 times a day if there are no changes.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions