solid-spec icon indicating copy to clipboard operation
solid-spec copied to clipboard

URI of created resource

Open namedgraph opened this issue 7 years ago • 4 comments

In the example Creating documents (files), what is the URI of the created resource? Location response header is missing.

namedgraph avatar Jan 18 '19 11:01 namedgraph

I suppose (and propose) that this should make it into solid-spec:

  • Ultimately it is implementation specific ( https://tools.ietf.org/html/rfc7231#section-7.1.2 ) ie. the server allocates the URI.
  • Some implementations MAY process Slug in the header request ( https://www.w3.org/TR/ldp/#h-ldpc-post-slug ) ie. the server may ignore it, use it as is, or incorporate it into own pattern.

csarven avatar Jan 18 '19 11:01 csarven

You’re looking for Content-Location.

RubenVerborgh avatar Jan 18 '19 12:01 RubenVerborgh

Not according to LDP 5.2.3 HTTP POST

namedgraph avatar Jan 18 '19 12:01 namedgraph

I found:

For a 201 (Created) response to a state-changing method, a Content-Location field-value that is identical to the Location field-value indicates that this payload is a current representation of the newly created resource.

—https://tools.ietf.org/html/rfc7231#section-3.1.4.2

But I stand corrected:

The Content-Location header field (Section 3.1.4.2) differs from Location in that the Content-Location refers to the most specific resource corresponding to the enclosed representation. It is therefore possible for a response to contain both the Location and Content-Location header fields.

—https://tools.ietf.org/html/rfc7231#section-7.1.2

RubenVerborgh avatar Jan 18 '19 13:01 RubenVerborgh