Inconsistent DELETE over HTTP

Hi all,
We are experiencing some weird behaviour when trying to delete a stream.

Here you can find a detailed description of the issue:
https://github.com/EventStore/EventStore/issues/99

The HTTP API is giving consistent replies yet different from documentation specifics.

  • First, a DELETE has to be sent with a Content-Type header defined. ES would reply 415 otherwise.
  • With Content-Type defined, a DELETE gets 204 (correct) from ES and the stream is deleted as expected (yet, it will still be displayed on the panel. Clicking on it would result in a white page)
  • Doing a double DELETE request on the same stream results in a “410” reply
  • Doing a POST or a GET on a deleted stream also results in a “410” reply
  1. Will these replies be consistent over time? Or there is any chance that they are a WIP and will change anytime soon? We are planning to use ES in production with a custom driver and it would be good to know what to expect.

  2. Why isn’t the documentation updated? Should we simply ignore the DELETE section as it is out-of-date?

Thanks and have a great day
Jacopo

What version are you testing on? What is the exact curl commands you are using?

Greg

Once a stream is deleted a 410 gone is a perfectly valid response for all cases mentioned. The “white page” is your browser not showing the status code (there are plugins to help this).

The requiring a content type however is wrong I will get on that this evening when I am out of clients. I will also review the documentation on deletes.

Greg

Hi Greg, thanks for your quick feedback.

All the replies received by ES make perfectly sense, they are valid and i don’t recommend to change them. BUT they are different from what shown in documentation (in addition to the Content-Type thing) and had no idea about which “version” was the right one in order to make a choice consistent over time.

If it can help, i’d be happy to fix the delete page of the wiki and open a pull request (it’s a rather quick and easy modification/addition).

Cheers

I am doing the change on content type now :slight_smile:

on dev branch:

curl -v -X DELETE http://127.0.0.1:2113/streams/astream

does not give error for content type. This is likely already fixed.