(Test) Persist Content-Type of resources #159
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently this only adds two tests that fail, but I'd like some input as to whether it is a reasonable expectation of an LDP implementation that they would pass.
They beg the question of whether an LDP server should remember the Content-Type of resources that are added to it.
From http://www.w3.org/TR/ldp/#ldpc-container :
The two tests are the same, but one each for 'text/plain' and 'application/json' resources. They
If these are tests that should pass, then it seems that one way of implementing this would be to automatically create a
resource-name.metaresource whenresource-nameis created/updated (e.g. via PUT). Ifresource-nameis PUT withContent-Type: text/plain, then this also createsresource-name.metawith some body that indicates that the canonical content type ofresource-nameistext/plain. Then, when someone does GETresource-namewith a certainAcceptheader, ldnode can know whether it can respond with the resource in that Content Type.Right now
resource-nameandresource-name.metafiles appear to be implicitly used together, but keeping them 'in sync' is expected to be done by the client the api. So this sort of consistency enforcement could, I guess, just be done by a proxy that sits in front of a 'dumb' ldnode.So the two questions