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

camel-http builds StringEntity with wrong contentEncoding

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.1, 4.1.0
    • 4.0.3, 4.2.0
    • camel-http
    • None
    • Unknown

    Description

      HttpProducer.java line 781:

      answer = new StringEntity(content, contentType, charset, false);
      

      Here the third parameter should be contentEncoding (e.g. null). Not charset.

      This will produce HTTP request having for example header:

      Content-Encoding: utf-8
      

      UTF-8 is not allowed Content-Encoding. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding.

      Some http servers returns HTTP 415 Unsupported Media Type because of that.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              simokivimaki Simo Kivimäki
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: