LearningLocker / learninglocker

Learning Locker - The Open Source Learning Record Store. Started in 2014.
https://learningpool.com/solutions/learning-record-store-learning-locker/learning-locker-community-overview/
GNU General Public License v3.0
553 stars 276 forks source link

State API requires eTags (should be optional) #490

Closed garemoko closed 9 years ago

garemoko commented 9 years ago

Version Latest from composer as 22nd Jan 2015

Steps to reproduce the bug

  1. Store an application/json document in the State API.
  2. Update the document (PUT) omitting the etag header.

Expected behaviour Document should be accepted, returning 204 no content. Etags are not required for the State API, only the Agent and Activity Profile APIs.

Actual behaviour 400 Bad request is returned.

Server information MongoDB with Basic auth. Running on MAMP.

Client information OS: OS X 10.10.1 Browser: Chrome

Additional information I've tested the client code I'm using against Wax and Cloud and it works.

ryasmi commented 9 years ago

From reading comments and the RFC spec (thanks for the link @scara).

"02A7F24DCC72C415DB410367EB8D82FF45573732" should be accepted.

I think the easiest thing to do here to avoid confusion is to trim quotes.

ryasmi commented 9 years ago

Just added some code to trim quotes. If anyone isn't happy with that feel free to create a new issue. Thanks for all the help on this issue @garemoko, @davidpesce, @fugu13, @scara. Really appreciate it! :smile: :smile: :smile: