SoftInstigate / restheart

Rapid API Development with MongoDB
https://restheart.org
GNU Affero General Public License v3.0
805 stars 171 forks source link

DELETE operation reports ETag header as required instead of If-Match which is actually checked #41

Closed gokrokvertskhov closed 9 years ago

gokrokvertskhov commented 9 years ago

DELETE operation on collection reports wrong required header (ETag, instead of If-Match)

Here (https://github.com/SoftInstigate/restheart/blob/develop/src/main/java/org/restheart/handlers/collection/DeleteCollectionHandler.java#L56) DELETE operation reports ETag header while getWriteEtag methods here (https://github.com/SoftInstigate/restheart/blob/develop/src/main/java/org/restheart/utils/RequestHelper.java#L53) checks for If-Match header existence.

mkjsix commented 9 years ago

Fixed by commit:

https://github.com/SoftInstigate/restheart/commit/e695013f134a0a47a302833858aac965f6d9ef97