runbox / runbox7

Runbox 7 web app
Other
125 stars 24 forks source link

#Mail: Deleting a large number of messages fails with HTTP 400 or 414 #1555

Open gtandersen opened 2 months ago

gtandersen commented 2 months ago

Describe the bug When deleting a large number of messages, the server responds to the DELETE request with:

To Reproduce Steps to reproduce the behavior:

  1. Go to https://runbox.com/app
  2. Select a large number (hundreds) of messages.
  3. Click to delete the messages.
  4. Observe that the messages disappear for a few seconds and then return.

Expected behavior All the selected messages should be deleted (moved to Trash).

Desktop (please complete the following information):

Additional context Moving a large number of messages with or without the local index works as expected, presumably because the request is a POST and not a DELETE. However, if moving messages without the local index they will still appear in the source folder on other devices that use the local index, possibly because moving messages to Trash (as opposed to deleting) does not include them in https://runbox.com/rest/v1/list/deleted_messages/.

See also https://github.com/runbox/runbox7/issues/1244

castaway commented 1 week ago

rest api / nginx settings: https://medium.com/aviabird/413-414-request-url-entity-too-large-error-nginx-b6dcece6f5dd

rmmapi.ts deleteMessages - http.delete(`/rest/v1/email/${ids} - this can be too long, we should change it to a POST, and put the IDs list in the body