Page MenuHomeSoftware Heritage

the Slug header should not be mandatory
Closed, MigratedEdits Locked

Description

According to the AtomPub specification, this header is not mandatory :

9.7. The Slug Header

Slug is an HTTP entity-header whose presence in a POST to a
Collection constitutes a request by the client to use the header's
value as part of any URIs that would normally be used to retrieve the
to-be-created Entry or Media Resources.

Servers MAY use the value of the Slug header when creating the Member
URI of the newly created Resource, for instance, by using some or all
of the words in the value for the last URI segment. Servers MAY also
use the value when creating the atom:id, or as the title of a Media
Link Entry (see Section 9.6).

Servers MAY choose to ignore the Slug entity-header. Servers MAY
alter the header value before using it. For instance, a server might
filter out some characters or replace accented letters with non-
accented ones, replace spaces with underscores, change case, and so
on.

And the SWORDv2 specify that:

Server implementations MUST adopt the behaviour and requirements in Section 9.7 of [AtomPub] with respect to the Slug header

See also T2740, T2752#52139 and ceb38e95a714