Simo Kivimäki created CAMEL-20037:
-------------------------------------

             Summary: camel-http builds StringEntity with wrong contentEncoding
                 Key: CAMEL-20037
                 URL: https://issues.apache.org/jira/browse/CAMEL-20037
             Project: Camel
          Issue Type: Bug
          Components: camel-http
    Affects Versions: 4.1.0
            Reporter: Simo Kivimäki


HttpProducer.java line 781:
{code:java}
answer = new StringEntity(content, contentType, charset, false);
{code}

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

This will produce HTTP request having for example header:
{code}
Content-Encoding: utf-8
{code}

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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to