Andreas Sewe schrieb:
James M Snell wrote:
> 8.5 Slug: Header
>
> When posting a resource to a collection in order to add a new member,
> a client MAY include a Slug request header. This constitutes a
> request by the client that the URI assigned to the new resource
> incorporate the string provided in the value of the Slug header.
> Server implementations MAY attempt to comply with the request. The
> syntax of this header MUST conform to the isegment-nz construct as
> defined in Section 2.2 of [RFC3987]. The value MAY contain characters
> from character sets other than [ISO88591] only when encoded according
> to the rules of [RFC2047].
Although discussion on PaceSlugHeader recently seems to have died down
(since, AFAIK, most people are quite happy with it), I would still like
to add one more comment:
While I do realize that the name "Slug" is quite entrenched in a
publishing context, I still wonder whether a more neutral name like
"Segment" would be better? IMHO, it is conceivable that other protocols
might want to reuse the header, in which case a name like "Segment" is
far more appropriate than "Slug". Any opinions?
Agreed. This is useful for any HTTP application that uses POST on a
collection-like resource.
The specification optimally would be separate from Atom. It will need to
be clear on whether it talks about URI segments, IRI segments (or
components of those), or merely of words to include. This affects
encoding of special characters (percent escaping or MIME header
escaping). I don't have any strong preference here, but it needs to be
clear what it is.
As a test, I would like to see an example where a sentence like
"$/€ exchange rate down by 5%"
is submitted (it contains a "%", so it will catch potential URI-escaping
problems, it contains a character with special meaning in URIs, and it
also contains a character not in ISO8859-1).
I may give it a try, but not before the weekend.
Best regards, Julian