Closed Bug 1757850 Opened 2 years ago Closed 2 years ago

CalDav modifyItem() returned Promise can hang if the server sends an etag that indicates no changes were made.

Categories

(Calendar :: Provider: CalDAV, defect)

defect

Tracking

(thunderbird_esr91+ unaffected)

RESOLVED FIXED
100 Branch
Tracking Status
thunderbird_esr91 + unaffected

People

(Reporter: lasana, Assigned: lasana)

Details

Attachments

(1 file)

getUpdateItem() is called to get the latest version of the item after we modify it which uses CalDavMultigetSyncHandler. This handler can skip providing the calIOperationListener with a result if the server's etag indicates the item has not changed.

https://searchfox.org/comm-esr91/rev/3acf40ef02eca6cea8ceb0f5058618106923acd9/calendar/providers/caldav/modules/CalDavRequestHandlers.jsm#984

The signature of modifyItem() is expected to provide the item once no errors are encountered so this creates room for subtle bugs. Since we are using Promises now, that means the modifyItem() result can be left in a pending state indefinitely.

So far the only scenario I am aware of where the etag may not change after an update is where the server for whatever reason silently ignores our modifications like bug 1727123.

Target Milestone: --- → 100 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/dfe2350b0346
Still parse updated items when etag indicates they are unchanged. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: