Skip to content

Draft: Set User-Agent to avoid weird "Expected multistatus response" failures on some webcal / CalDAV / HTTPS calendars hosts during discovery

This avoids some web servers or WAFs doing weird stuff with our requests which would lead to situations where our web calendar source discovery would face server errors, redirects, incorrect contents, etc.

Fixes #651, and presumably #290, if we're lucky.


This is a draft because:

  • I'd like to get testing feedback from users from issue #290, because I have no public testcase for it.
    I can only confirm that it fixes the bug with the sample link I was provided in issue #651.
  • Ideally, "in a perfect world" I would prefer the app to identify as "GNOME Calendar/PACKAGE_VERSION libsoup/thelibsoupversion" rather than "GNOME Calendar - libsoup/thelibsoupversion", but I haven't figured out how to do that.
    Neither soup_message_headers_append (soup_message_get_request_headers (message), "User-Agent", "GNOME Calendar" PACKAGE_VERSION); (like EDS does)
    nor soup_message_headers_append (soup_message_get_request_headers (message), "User-Agent", "GNOME Calendar/%s" PACKAGE_VERSION); …is valid C syntax, if the compiler is to be believed.

Merge request reports