Closed Bug 1449269 Opened 2 years ago Closed 2 years ago
DAV OPTIONS request doesn't handle 204 (or other 2xx) No Content in check Server Caps
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 Build ID: 20180327042013 Steps to reproduce: The CalDAV calendar subscription code sends an OPTIONS request to the server to check its capabilities, yet incorrectly considers a 204 No Content response as invalid. As the response to OPTIONS has no response body, 204 No Content is to be expected. > CalDAV: Unexpected status 204 while querying options <calendar name here> Cause seems to be line 1941 in providers/caldav/calDavCalendar.js. If that were to be set to `request.responseStatus >= 200 && request.responseStatus < 300`, I'm guessing it'd work fine.
My line assumption came from the commit https://hg.mozilla.org/comm-central/file/08bab4937197.
This patch takes care to accept also an 204 response on an OPTIONS request. Adding other 2xx flavours here doesn't seem to be appropriate here. Let's uplift this fix to 6.2 as well.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/comm-central/rev/7fc4d1316639 Accept 204 as valid server response on OPTIONS requests. r=philipp
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Beta (TB 60 beta 2, Calendar 6.2): https://hg.mozilla.org/releases/comm-beta/rev/435135a9b280c3252ff84fb5565ff7b80167c325
Target Milestone: 6.3 → 6.2
You need to log in before you can comment on or make changes to this bug.