Skip to content

Incompatibility with Cyrus / Fastmail #166

@jtagcat

Description

@jtagcat

Related: #68

https://github.com/jtagcat/calredact/blob/6c12f21a34d440c4633859c171da24d62495eed3/main.go#L106-L115
Tested faulty with fastmail.com (Cyrus). Same generated request works (207) on OX App Suite and Nextcloud.

Code in question: https://github.com/jtagcat/calredact/blob/6c12f21a34d440c4633859c171da24d62495eed3/main.go#L106-L115

Response for go-webdav on fastmail.com:

HTTP/1.1 400 Bad Request
Server: nginx
Date: Mon, 08 Jul 2024 18:25:32 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 491
Connection: keep-alive
Vary: Accept-Encoding
X-Frontend: frontend1
X-Trace-Id: ti_72b00284f07bc0d6f468732a01304fd4

<!DOCTYPE html>
<html style='color-scheme:dark light'>
  <head>
    <title>400 Bad Request</title>
  </head>
  <body>
    <h1>Bad Request</h1>
    <p>The request was not understood by this server.</p>
    <hr>
    <address>Cyrus-HTTP/3.11.0-alpha0-568-g843fbadbe-fm-20240701.003-g843fbadb Cyrus-SASL/2.1.27 Lib/XML2.9.10 Jansson/2.14 OpenSSL/1.1.1w Wslay/1.1.1 Zlib/1.2.11 Xapian/1.5.0 LibiCal/3.1 ICU4C/74.2 SQLite/3.34.1 Server at caldav.fastmail.com Port 2275</address>
  </body>
</html>

Response for patched request:

HTTP/1.1 207 Multi-Status
Server: nginx
Date: Mon, 08 Jul 2024 18:19:52 GMT
Content-Type: application/xml; charset=utf-8
Connection: keep-alive
Vary: Accept-Encoding, Brief, Prefer
X-Frontend: frontend1
X-Trace-Id: ti_cc0dac5f325d8344d7401cd5217ce56d
Content-Length: 648

<?xml version="1.0" encoding="utf-8"?>
<d:multistatus xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:">
  <d:response>
    <d:href>/dav/calendars/user/calretest@fastmail.com/5B895624-3D36-11EF-B5BC-83625697A2A5/e5213f54-a17a-403f-90b5-83919b5ef783.ics</d:href>
    <d:propstat>
      <d:prop>
        <c:calendar-data><![CDATA[BEGIN:VCALENDAR
END:VCALENDAR
]]></c:calendar-data>
        <d:getlastmodified>Mon, 08 Jul 2024 16:33:15 GMT</d:getlastmodified>
        <d:getetag>"70e4896a60aabe57ad32610e9b090bf7b5257208"</d:getetag>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

Requests (left: generated, right: patched):
image

It appears that the primary incompatibility is the d: and c:/:c syntax. I'm a mere consumer, not familiar with the RFCs. Is this an issue with go-webdav or Cyrus?

I based the patch on Cyrus source + proxying Thunderbird traffic as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions