Stream: implementers
Topic: Location or Content-Location header
Jared Davison (Sep 06 2017 at 03:12):
Hi, I have noticed an implementation has a Content-Location header, but not a Location header in the FHIR response.
I found the follow page which discusses the distinction between them.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Location
"Location and Content-Location are different. Location indicates the URL of a redirect, while Content-Location indicates the direct URL to use to access the resource, without further content negotiation in the future. Location is a header associated with the response, while Content-Location is associated with the data returned. This distinction may seem abstract without examples."
I searched this page http://build.fhir.org/http.html for location header, but found no mentioned of Content-Location.
what should we use?
Grahame Grieve (Sep 06 2017 at 07:51):
in a response to what?
Jared Davison (Sep 06 2017 at 07:59):
it was a response to a ProviderRole search that I saw the Content-Location header
Grahame Grieve (Sep 06 2017 at 08:04):
we don't describe any use of a location header in response to a search
Jared Davison (Sep 06 2017 at 08:04):
I'm not even sure that we need a Location header as a response to the search on a resource from the api doc on search. the table at the bottom of the http restful api page suggests it is only needed for Create or Update
Jared Davison (Sep 06 2017 at 08:04):
so there's nothing wrong with the implementation then. it is just doing extra stuff i guess
Grahame Grieve (Sep 06 2017 at 08:06):
sounds like it
Jared Davison (Sep 06 2017 at 08:07):
thanks Grahame
Lloyd McKenzie (Sep 06 2017 at 13:18):
Based on @Jared Davison's description, are we using the wrong HTTP header in the spec? Should we be requring Content-Location rather than Location?
Jared Davison (Sep 07 2017 at 05:47):
Content-Location Header: https://tools.ietf.org/html/rfc7231#section-3.1.4.2
Location Header: https://tools.ietf.org/html/rfc7231#section-7.1.2
Grahame Grieve (Sep 08 2017 at 03:06):
I don't think we're using it wrong. we've reviewed that several time
Last updated: Apr 12 2022 at 19:14 UTC