Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-2027

PatchMethodFilter doesn't handle request of MediaType application/json-patch+json if MediaType have argument

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.6.2.Final, 4.0.0.Beta6
    • 3.5.0.Final
    • jaxrs
    • None
    • Hide

      Make an API call on a PATCH endpoint, with is equivalent in GET, and call the endpoint with content-type : application/json-patch+json;charset=utf-8

      Show
      Make an API call on a PATCH endpoint, with is equivalent in GET, and call the endpoint with content-type : application/json-patch+json;charset=utf-8
    • Workaround Exists
    • Hide

      Add a PreMatching Filter to fix the MediaType of the request, when the request is a PATCH request, with application/json-patch+json and at least one argument.

      Show
      Add a PreMatching Filter to fix the MediaType of the request, when the request is a PATCH request, with application/json-patch+json and at least one argument.

      On PATCH request in RestEasy endpoint, if the MediaType of the request if of type and subtype application/json-patch+json with argument with it, in our case charset:utf-8 parameter, the patch request filter org.jboss.resteasy.plugins.providers.jackson.PatchMethodFilter doesn't handle this request as a PATCH request.
      In our case, the request come from a React Native application, on Android version, the same code works on iOs, which doesn't add the charset at the end of the content-type.

              rhn-support-asoldano Alessio Soldano
              benjamin.chapoton benjamin chapoton (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: