sirixdb / sirix

SirixDB is an an embeddable, bitemporal, append-only database system and event store, storing immutable lightweight snapshots. It keeps the full history of each resource. Every commit stores a space-efficient snapshot through structural sharing. It is log-structured and never overwrites data. SirixDB uses a novel page-level versioning approach.

Home Page:https://sirix.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistencies in GET request in ACCEPT header

redwanulsourav opened this issue · comments

Not sure if this is accepted behavior or a bug. I found this out when testing the REST API with curl.

For inserting resource, if a GET request is sent to path /<database_name>/<resource_name> with no ACCEPT header set, it by default assumes a JSON database. If <database_name>/<resource_name> is an XML resource, it throws an exception.

The reason might be in GetHandler.kt , lines 98-111.

If this is needs to be updated, then a 400 Bad Request can be set if no ACCEPT header was set in GET handler. Otherwise the issue can be ignored.

Bad request would be ideal, yes

Just realized that without bad request handler implemented, it is going to throw an exception no matter how it is handled. I will probably delete this issue and work on the refactorings and the bad request handler.