Closed acoburn closed 5 years ago
The EntityTag
class has a boolean parameter, defining whether the ETag is weak or strong. For example, the code creating the object is here. Rather than defining the ETag (for RDFSources) to always be weak, this is controlled by a configuration parameter. FWIW, the Solid server responds with strong ETags for RDFSource resources.
The date parameter is optional according to the Memento specification. We're not doing anything wrong by omitting them, but it is kind of convenient (in some contexts) to have that param present -- though in other contexts (i.e. naive Link parsers) those values can be very inconvenient.
Ok, cool. I'm much more worried about the wrong than about the not-as-convenient, because sooner or later the assumption that RDFSources can guarantee octet-for-octet identity is going to bite anyone who makes it. I'm not going to lay down across the road on this, but I would much rather us default to correct and let people who want to play with fire take responsibility for burning themselves.
That's completely fine with me. Default = correct, but you want to play with fire, you can do that.
There are quite a few configuration properties that control small, but potentially important, details of the Trellis runtime. The process by which the default values have been chosen is based more on setting the default = the earlier (non-configurable) behavior, but that should be reviewed.
In particular, these values should be considered:
ETags. Right now, an RDFSource will respond with a weak ETag, which is technically correct from the perspective of HTTP, but it's terribly inconvenient for clients that use those ETags for
If-Match
conditional operations. One can set thetrellis.http.weak.etag
property tofalse
(default = true) to always respond with strong ETags (binary resources respond with strong ETags either way). I lean toward changing this tofalse
as a default.Precondition required on PUT. The LDP specification encourages (
SHOULD
) a server to acceptPUT
requests only if they are done with precondition headers (If-Match
,If-Unmodified-Since
). By default, this is not enabled, though it needs to be turned on for the LDP test suite. I lean toward leaving this turned off, i.e. default =false
.PUT uncontained. A
PUT
request to create a new resource performs a put-uncontained operation. That is, a parent container will not have anldp:contains
link to the child resource. This behavior can be changed with thetrellis.http.put.uncontained
configuration. The default value istrue
. I lean towards changing this tofalse
as a default.Memento header dates. Memento link headers contain a date parameter with an
RFC 1123
date string. These date strings contain a comma, which is perfectly legit, but a lot of link header parsers get tripped up with this. Thetrellis.http.memento.headerdates
configuration key can be used to omit these header parameters. The default is to include those dates, i.e. default =true
. I have very little opinion about this one.There are other component-specific configuration defaults, but those are of less importance than the defaults defined in the HTTP layer itself.