- From: <henry.story@bblfish.net>
- Date: Sat, 29 Nov 2014 13:49:23 +0100
- To: public-ldp <public-ldp@w3.org>
> On 29 Nov 2014, at 12:43, henry.story@bblfish.net wrote: > > 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" I am probably wrong here. This is just a bit of a tricky part of the spec. 1. The Etag above is mis-formed because it contains spaces http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-26#page-9 ETag = entity-tag entity-tag = [ weak ] opaque-tag weak = %x57.2F ; "W/", case-sensitive opaque-tag = DQUOTE *etagc DQUOTE etagc = %x21 / %x23-7E / obs-text ; VCHAR except double quotes, plus obs-text 2. But because the If-Match header is present and no tags match the response must fail. > > 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 I think others have come across this problem before. > > 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/ > Social Web Architect http://bblfish.net/
Received on Saturday, 29 November 2014 12:49:53 UTC