2007/3/19, Nikunj Mehta:
A. Pagaltzis wrote:
> *grmf* And then I went and accidentally dropped the specific
> qualification from the text. What I meant is, of course, this:
>
> Slug is an HTTP entity-header whose presence in a POST to a
> Collection constitutes a request by the client to use the
> header value as part of the URI normally used to retrieve the
> to-be-created Member Resource.
>
> Regards,
>
We define Slug as an "entiy-header" that is only present in a POST
request, and has no meaning elsewhere. Doesn't that make it a request
header? If so, it must be clearly stated as such. ยง5.3 of RFC 2616
clearly states that
...[N]ew or experimental header fields MAY be given the semantics of
request-header fields if all parties in the communication recognize
them to be request-header fields.
The Slug header was proposed as an entity-header to be similar to the Title header from [1], Slug defining a "short name" for the resource (see [2]). The fact that that "short name" can be used as the basis for the resource URI is just a side-effect. Slug was defined as a request-header in PaceSlugHeader2 [3] but PaceSlugHeader4 [3] finally made it in draft -10, where it's defined as an entity-header. See also PaceSlugHeader3 [5]. The "when accompanying a POST" thing appeared in draft -12. The "short name" thing disappeared in draft -14. This is, I think, mainly due to the fact that the editors never were in favor of either the Slug header in itself or it being an entity-header. Having the Slug as an entity-header allows for changing it after the initial POST but before the entry is published (hence before the "public URI" is created). Changing the Slug after publishing should IMO either be rejected or without side-effect (i.e. the "public URI" remains the same), but this is just a best practice and shouldn't appear in the spec. +1 to applying the Slug to the "public URI" -1 to changing it to a request-header (PaceSlugHeader2 was rejected in favor of PaceSlugHeader4) And please, editors, bring back the "short name" thing. [1] http://www.w3.org/Protocols/HTTP/Object_Headers.html [2] http://en.wikipedia.org/wiki/Slug_%28disambiguation%29#Other_uses [3] http://intertwingly.net/wiki/pie/PaceSlugHeader2 [4] http://intertwingly.net/wiki/pie/PaceSlugHeader4 [5] http://intertwingly.net/wiki/pie/PaceSlugHeader3 -- Thomas Broyer