Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-11162

camel-rest - Should we add content-type check for server side

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.22.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      For example setting up a rest-dsl which consumes application/json and then a client calls it with text/plain or application/xml, should we then automatic let rest consumer detect this and return a HTTP status 415 (unsuported media type)

      Not all the HTTP server components does this today, eg jetty etc. But when using restlet which is more natual REST it would do so.

      We could then add an option to turn this on|off.

      The check is only if the media-type is within the list that may have been specified on consumes in the rest-dsl.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                davsclaus Claus Ibsen
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: