Hi Alan,

On Mon, Sep 7, 2015 at 6:44 AM, Robson, Alan <alan.rob...@viasat.com> wrote:
>
> I’ve been writing records via LDP using the HTTP POST operation and
> specifying a name for the resource using the slug header. I’ve noticed that
> if the slug contains period/dots/full-stops they are replaced with hyphens.
> For example, if I try to post something with a slug of
> “hello.there.marmotta” it posts as “hello-there-marmotta”.
>

Please, take into account that the Slug header in LDP 1.0 is just a
suggestion about the resource name, but the final choice is done by the
server (ad it could even completely ignore the suggestion made by the
client).

Literally Section 5.2.3.10 <http://www.w3.org/TR/ldp/#h-ldpc-post-slug>
says: "LDP servers may allow clients to suggest the URI for a resource
created through POST, using the HTTP Slug header as defined in [RFC5023].
LDP adds no new requirements to this usage, so its presence functions as a
client hint to the server providing a desired string to be incorporated
into the server's final choice of resource URI."

What is the reasoning behind rearranging the contents of the slug and is
> there some way I might sidestep it (or should I avoid doing so) ?
>

Marmotta internally encodes the resources based on a defined strategy. For
instance we reserve the dot character ('.') for the resource extension in
case you want a specific serialization or binary representation; hyphens
are always the join character. If you want to know more details about the
implementation of that strategy, you can find it at the
class org.apache.marmotta.platform.ldp.util.SlugUriGenerator at the
marmotta-ldp module. If you would like to contribute a new strategy, the
community always welcomes contributions.

Hope that helps.

Cheers,

-- 
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 6602747925
e: sergio.fernan...@redlink.co
w: http://redlink.co

Reply via email to