Comments (7)
The language you quote is for "If-Modified-Since" and the test in
"testPutBadETags" is testing "If-Match" header usage with PUT.
I don't think there is a problem. testPutBadETags doesn't expect when the
value is "not well-formatted", it is well-formatted entity-tag. It expects
to find a value for ETag such that it won't match a value on the server to
therefore generate the 412 response per the spec.
I can't find any language otherwise in RFC 7232 for If-Match.
Thanks,
Steve Speicher
http://stevespeicher.me
On Wed, Jun 25, 2014 at 4:26 AM, Fernando Serena Acedo <
[email protected]> wrote:
RFC 7232 http://tools.ietf.org/html/rfc7232 says:
"A recipient MUST ignore the If-Modified-Since header field if the
received field-value is not a valid HTTP-date, or if the request method is
neither GET nor HEAD."Should not the servers behave the same way with bad ETags? Currently,
testPutBadETags expects a 412 when the value is not well-formatted. In that
case, I think LDP servers should ignore the If-Match header and return a
428 (precondition required) or a 2xx.—
Reply to this email directly or view it on GitHub
#70.
from ldp-testsuite.
Reading RFC2616, I believe the only requirement for an ETag is that it's quoted (optionally with a leading W/ for weak ETags). So in that sense the value is well-formed.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19
It might a better test to do one successful PUT first, then try again with the stale ETag value.
from ldp-testsuite.
A better link:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11
entity-tag = [ weak ] opaque-tag
weak = "W/"
opaque-tag = quoted-string
from ldp-testsuite.
Also as we've explored, many implementations don't enforce the quoting.
Though we are a compliance testsuite and should complain when it doesn't
follow the rules.
Thanks,
Steve Speicher
http://stevespeicher.me
On Wed, Jun 25, 2014 at 11:49 AM, Samuel Padgett [email protected]
wrote:
A better link:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11
entity-tag = [ weak ] opaque-tag
weak = "W/"
opaque-tag = quoted-string—
Reply to this email directly or view it on GitHub
#70 (comment).
from ldp-testsuite.
True. And, for what it's worth, testPutBadETag does send a quoted string.
One other point, and then I'll stop spamming :) ...
There's no danger in ignoring a bad If-Modified-Since header because it's simply a caching optimization. Ignoring a bad ETag header, however, could result in data loss.
from ldp-testsuite.
I agree.
But although it seems common sense once discussed, this behavior is not described in the specification. I mean, I'm afraid that nowhere says that if the ETag is badly formatted the server should return a 412.
from ldp-testsuite.
We are sending a properly formatted but non-existant ETag. So we are testing 412 in that case. I could see strict servers returning any of a number of possible 4xx values if ETag was formatted improperly or just accepting it.
from ldp-testsuite.
Related Issues (20)
- Mark test DirectContainer-ActAsIfInsertedContentRelationTripleExists as approved per 20-Oct
- Provide IndirectContainer tests HOT 3
- Remove test case entry for client test case on server-initiated paging HOT 1
- Client testing HOT 2
- Allow LDP Servers to include charset parameter in JSON-LD media type HOT 1
- Publish contribution hints and code formatting info
- TR publication HOT 2
- Add simple setup / run instructions HOT 4
- Many tests fail with NullPointerError if a representation is an empty graph HOT 1
- Suite `testRestrictUriReUseSlug` fails if the server DOES NOT create second resource
- Strange results in test testActAsIfInsertedContentRelationTripleExists HOT 1
- Upgrading Jena to 3.0.1 HOT 6
- Lost with the log, hard to understand the HTTP requests being made in relation with the FAILURE messages HOT 1
- Test suite KO : Invalid signature file digest for Manifest main attributes HOT 6
- 0.1.2 Release? HOT 1
- attach-javadocs error when running `mvn package` HOT 10
- Unclear how to run only part of the suite HOT 2
- testsuite runner spontaneously tries to connect to http://localhost:8080 HOT 1
- PostContainer test seems wrong?
- gpg: no default secret key: No secret key
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ldp-testsuite.