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

camel-ahc body for String data

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.24.2
    • Fix Version/s: 3.7.0, 2.25.3
    • Component/s: camel-ahc
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      the issue is due to a mistake done by async-http-client team.

      Commit : https://github.com/AsyncHttpClient/async-http-client/commit/d47c56e7ee80b76a4cffd4770237239cfea0ffd6#diff-5247ce5d437efdde629533d6239bf0c24358bdf0157fa204050e908c48a8c1f3

      They made the ByteArrayBodyGenerator constructor package level.

       

      Due to this change, camel had to adapt and for String type of body, they changed their implementation from ByteArrayBodyGenerator to InputStreamBodyGenerator.

      In InputStreamBodyGenerator, the content length is by default set to -1.

       

      Since, content length was less than 0, NettyRequestFactory in async-http-client was using Transfer-Encoding header instead of Content-Length header.

       

      Solution :

      Async-http-client team corrected their mistake in the following commit :

      https://github.com/AsyncHttpClient/async-http-client/commit/4469c30f7d54352865ff321b0de0148f9698c9b5#diff-208f8952b67ba2a28d2cb2d6881485f8fc1b2b5df53a841d4a4a48b2ed8aded0

       

      However, the change was not reverted in camel, and hence, this regression has happened.

      The change needs to be reverted in camel as well. This is causing regression when we are migrating from lower camel versions to higher versions.

       

      The change was introduced with the following commit.

      https://github.com/apache/camel/commit/684ef5786838e051cece2f510d9dafabdc310d02#diff-4d41a9fe212a88af9bc5cddb7e348f8031f39ceaf2263d7275fc4b6dd09e0867

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sms0070 SUYASH MANI SHARMA

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment