Giter Site home page Giter Site logo

Comments (6)

arscan avatar arscan commented on May 24, 2024

Example for us: https://projectcrucible.org/servers/58a31ac66372752300000000#58a58e7863727544da020000/resourcetest_allergyintolerance/X070_AllergyIntolerance

It looks like our intent was to not send a content-type header on DELETE, because we aren't sending any content in the body of the request. In other parts of our code we fall back to xml by default if no content-type header is set though, so it incorrectly substitutes in the xml Content-Type.

I can fix that. Would not being sent a Content-Type header on DELETE work in your system? I think that is what is technically correct.

Thanks for the bug report.

from crucible.

msfyuksel avatar msfyuksel commented on May 24, 2024

Exactly, there is no need to have Content-Type header on DELETE. But it is not only Content-Type, we have a problem with the Accept header in fact.

For example, this is a DELETE request as the last step of the "TS Connectathon 14 Patient Base Server Id Json" test suite.

DELETE /fhir-1-8-0/Patient/2f2ffb4e68e54055898e12f182ac521e HTTP/1.1
Accept: application/fhir+xml
Accept-Encoding: gzip, deflate
User-Agent: Ruby FHIR Client
Content-Type: application/fhir+xml;charset=UTF-8
Accept-Charset: UTF-8
Resource: FHIR::Patient
Params: /2f2ffb4e68e54055898e12f182ac521e

All the former CREATE, UPDATE, SEARCH requests in this test suite set both Accept and Content-Type headers as "application/fhir+json", but only the DELETE request use "application/fhir+xml". Maybe the fall-back mechanism in DELETE applies to Accept as well.

Thanks for your immediate response.

from crucible.

arscan avatar arscan commented on May 24, 2024

I made the fix in fhir-crucible/fhir_client#61 and fhir-crucible/fhir_client#62 and deployed the updated version. I'm going to close this, but if you are still seeing the problem for some reason let us know. Thanks for the bug report!

from crucible.

msfyuksel avatar msfyuksel commented on May 24, 2024

Well, unfortunately I still receive xml headers in json tests. The below is again from "TS Connectathon 14 Patient Base Server Id Json" test suite:

DELETE /fhir-1-8-0/Patient/be02f0d5-73b3-412a-be53-d8712b9141e3 HTTP/1.1
Accept: application/fhir+xml
Accept-Encoding: gzip, deflate
User-Agent: Ruby FHIR Client
Content-Type: application/fhir+xml;charset=UTF-8
Accept-Charset: UTF-8
Resource: FHIR::Patient
Params: /be02f0d5-73b3-412a-be53-d8712b9141e3

FYI, in the mean time, we have implemented xml support in our server. So, we are actually able to handle this request, but I still think that xml headers should not exist in a json test suite.

Furthermore, all the $validate requests do arrive with xml headers (and xml body) as well in these json tests.

from crucible.

arscan avatar arscan commented on May 24, 2024

Yes, we definitely want to have this fixed, even if you upgraded your server to support xml. Thanks for letting me know it is still behaving incorrectly. I wonder if our deployment this weekend didn't update dependencies to our updated client properly, since both this and the trailing slash in history requests should be have been fixed. I'll see if I can track it down this afternoon.

from crucible.

msfyuksel avatar msfyuksel commented on May 24, 2024

OK, thank you. I am ready to test in the next update.

from crucible.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.