http-extensions icon indicating copy to clipboard operation
http-extensions copied to clipboard

Content-Location with QUERY

Open MikeBishop opened this issue 3 years ago • 7 comments

Fixes #1745.

MikeBishop avatar Oct 13 '21 19:10 MikeBishop

Content-Location doesn't indicate whether the resource on the other end will return these results in perpetuity, or whether it'll return the results to the query (which may change over time).

So it might be better to be explicit -- if the server wants to create a resource for these results, use 201 Created with Location that explicitly points to a resource that represents this query, and which can change over time. The server can choose whether to include the query results on the 201, of course.

mnot avatar Oct 14 '21 00:10 mnot

Given that we're defining this method, it seems like we can specify which is the intended behavior, or provide mechanisms for each.

MikeBishop avatar Oct 14 '21 01:10 MikeBishop

Could perhaps a Link header be used to disambiguate the two use-cases?

Link: </updated-results>; rel="latest-version", </these-results>; rel="memento"

The chosen link relations are probably not appropriate, I just picked some that exists to provide a complete example.

asbjornu avatar Nov 02 '22 16:11 asbjornu

Per discussion in Brisbane side-meeting:

  • Need to add text indicating what it means if the C-L target errors
  • Add text clarifying that the resource can be cached despite the different URI (this is cautioned against in SEMANTICS)
  • Security Considerations? Suggest that the URI SHOULD NOT expose the plaintext of the query contents (for #1909)

MikeBishop avatar Mar 21 '24 07:03 MikeBishop

@martinthomson, I've added language restricting it to same-origin; is there a stronger statement you were expecting to see here?

MikeBishop avatar Apr 12 '24 14:04 MikeBishop