test suite bug

There is a problem with the testPutBadETag
If I run:

java -jar target/ldp-testsuite-0.2.0-SNAPSHOT-shaded.jar --httpLogging --server https://localhost:8443/2013/ --basic --test testPutBadETag 

my server [1] correctly returns a 200 when the test
suite sends a PUT request with the header  [2]

If-Match="This is not the ETag you're looking for"

The same is true for the PUT on an LDPC with that same If-Match header.
But even if the test suite sent a correct If-Match header the 
explanation given here

"LDP servers MUST respond with status code 412 (Condition Failed) if ETags fail
to match when there are no other errors with the request [HTTP11]. LDP servers
that require conditional requests MUST respond with status code 428
(Precondition Required) when the absence of a precondition is the only reason
for rejecting the request [RFC6585].
"

leaves a lot of wiggle room: most of all I am not sure what a PUT
on a collection should do. I could add code that checked that there 
were no server managed properties such as ldp:contains that were
changed, and sent back a 409 Conflict if so as suggested by section
4.2.4.3

Henry



[1] https://github.com/read-write-web/rww-play/tree/dev
[2] http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-26#page-9

Social Web Architect
http://bblfish.net/

Received on Saturday, 29 November 2014 11:44:15 UTC