New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_format parameter does not respect "application/xml+fhir" #346

Closed
jimsteel opened this Issue Apr 22, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@jimsteel

jimsteel commented Apr 22, 2016

The _format parameter seems to understand "xml", "text/xml" and "application/xml", but not "application/xml+fhir", as per http://www.hl7.org/fhir/2016May/http.html#mime-type.

@jamesagnew

This comment has been minimized.

Show comment
Hide comment
@jamesagnew

jamesagnew Apr 22, 2016

Owner

Relevant spec wording:

However in order to support various implementation limitations, servers SHOULD support the optional _format parameter to specify alternative response formats by their MIME-types. This parameter allows a client to override the accept header value when it is unable to set it correctly due to internal limitations (e.g. XSLT usage). For the _format parameter, the values xml, text/xml, application/xml, and application/xml+fhir SHALL be interpreted to mean the normative XML format defined by FHIR and json, application/json and application/json+fhir SHALL be interpreted to mean the informative JSON format. In addition, the values html and text/html are allowed.

I'm betting we don't support text/html either

Owner

jamesagnew commented Apr 22, 2016

Relevant spec wording:

However in order to support various implementation limitations, servers SHOULD support the optional _format parameter to specify alternative response formats by their MIME-types. This parameter allows a client to override the accept header value when it is unable to set it correctly due to internal limitations (e.g. XSLT usage). For the _format parameter, the values xml, text/xml, application/xml, and application/xml+fhir SHALL be interpreted to mean the normative XML format defined by FHIR and json, application/json and application/json+fhir SHALL be interpreted to mean the informative JSON format. In addition, the values html and text/html are allowed.

I'm betting we don't support text/html either

@jamesagnew

This comment has been minimized.

Show comment
Hide comment
@jamesagnew

jamesagnew Apr 23, 2016

Owner

Ok, after some digging, it turns out we do in fact support _format=application/xml+fhir except that... the plus needs to be escaped as %2B since xml+fhir is interpreted as xml fhir by the server.

I'm going to commit a fix to be lenient here by accepting the unescaped style, and to accept text/html too.

Owner

jamesagnew commented Apr 23, 2016

Ok, after some digging, it turns out we do in fact support _format=application/xml+fhir except that... the plus needs to be escaped as %2B since xml+fhir is interpreted as xml fhir by the server.

I'm going to commit a fix to be lenient here by accepting the unescaped style, and to accept text/html too.

@jamesagnew

This comment has been minimized.

Show comment
Hide comment
@jamesagnew
Owner

jamesagnew commented Apr 23, 2016

Fixed by 3eb805f

@jamesagnew jamesagnew closed this Apr 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment