Uploaded image for project: 'WildFly WIP'
  1. WildFly WIP
  2. WFWIP-290

Response Content-Type is 'application/json' even when HTTP request defines 'application/json-patch+json' "Accept" header

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • MP OpenAPI
    • None
    • Hide

      The issue can be reproduced following the steps:

      • execute Wildfly instance build from feature branch
      • provide a deployment to register `openapi` endpoint
      • send HTTP GET request to `openapi` defining the Accept header, e.g.:
      curl --location --request GET 'http://127.0.0.1:8080/openapi' \
      --header 'Accept: application/json-patch+json'
      
      • the response "Content-Type" header is set to "application/json".

      Used feature branch is: https://github.com/pferraro/wildfly/tree/WFLY-12313

      Show
      The issue can be reproduced following the steps: execute Wildfly instance build from feature branch provide a deployment to register `openapi` endpoint send HTTP GET request to `openapi` defining the Accept header, e.g.: curl --location --request GET 'http: //127.0.0.1:8080/openapi' \ --header 'Accept: application/json-patch+json' the response "Content-Type" header is set to "application/json". Used feature branch is: https://github.com/pferraro/wildfly/tree/WFLY-12313

      When sending HTTP request header "Accept: application/json-patch+json", "Content-Type: application/json" response is returned.
      This behavior seems to be less strict compared to what is defined by the spec, as it states "application/json" is specifically needed in order to get the same value back from server.

            pferraro@redhat.com Paul Ferraro
            fburzigo Fabio Burzigotti
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: