FHIR Chat · Bundle request URLs · implementers

Stream: implementers

Topic: Bundle request URLs


view this post on Zulip Alexander Henket (Oct 23 2017 at 13:48):

https://www.hl7.org/fhir/bundle-request-simplesummary.xml.html

In most examples there is a leading slash in every query URL. E.g.:

<url value="/Condition?patient=example"/>

HAPI-FHIR and Vonk will happily return the same response Bundle, regardless of the presence of a leading slash. In my mind the leading slash would mean I execute the query against the server hostname and not against the FHIR endpoint I'm posting too (they might be the same, but they usually aren't)

So suppose I post to http://test.fhir.org/r3 I would expect the query above to be executed as http://test.fhir.org/Condition?patient=example. This is comparable to how web pages are rendered by a browser afaik. On test.fhir.org I then expect an error because there is no FHIR server serving Condition resources at that URL.

1. How is it supposed to work?
2. Is it "flexible" or a bug that leading slashes don't influence the response?

(Note: test.fhir.org doesn't respond at all to the Bundle so something else is off there)

@Marten Smits, @Ardon Toonstra

view this post on Zulip Grahame Grieve (Oct 23 2017 at 19:43):

I think that looks like an error

view this post on Zulip Alexander Henket (Oct 26 2017 at 07:16):

@Grahame Grieve Which part? test.fhir.org not responding or hapi/vonk responding the same way regardless of a leading slash in the path? Or both :-) ?

view this post on Zulip Grahame Grieve (Oct 26 2017 at 09:55):

accepting the slash at the start

view this post on Zulip Alexander Henket (Oct 27 2017 at 10:28):

Well that's likely caused by the spec saying that in all examples we could find. Ticket?

view this post on Zulip Grahame Grieve (Oct 27 2017 at 20:34):

I think so

view this post on Zulip Christiaan Knaap (Nov 01 2017 at 18:42):

I've read https://tools.ietf.org/html/rfc1808 about this and @Alexander Henkets comment seems valid to me. However, the context of that rfc is mostly document retrieval, whereas this is about sending a document (Bundle in this case). In the retrieval context of the rfc it may be useful to use a relative path starting at the root, using the / at the start, since the programmer has control over what is in the tree of documents on the server.
But in our case, does it make sense to do this at all. And as a consequence: Should we deviate from the rfc and not allow a slash at the start for any relative url in a Bundle - in order to avoid any confusion on how it might be processed?
Currently in Vonk we simply ignore the leading slash and treat the url as relative to the endpoint the Bundle was sent to. (On the public Vonk endpoint that is equal to the host, that is a lucky coincidence).


Last updated: Apr 12 2022 at 19:14 UTC