Uploaded image for project: 'Magnolia GraphQL'
  1. Magnolia GraphQL
  2. MGNLGQL-100

Modify Servlet to accept all JSON requests

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • 1.0
    • None

    Description

      If a request is made with, for example, the charset defined, the Servlet will reject the request. That is because there is a check of equality rather than a "startsWith" call. I am creating this ticket and will create a pull request with the modification.

      This issue presented itself when trying to use the IntelliJ JS-GraphQL plugin, which makes a request with: Content-Type [application/json; charset=UTF-8] 

      The resulting message is:

      java.lang.IllegalArgumentException: Content-Type [application/json; charset=UTF-8] not allowed for POST method.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              srhodes Scot Rhodes
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Task DoD