Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-13822

Unable to disable chunking on camel-http4 producer endpoint

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • fuse-7.7-GA
    • fuse-7.5-GA
    • Camel
    • None
    • % %

    Description

      It is not possible to disable chunking on camel-http4 producer endpoint. Here is a simple camel route:

      <route>
          <from uri="timer://test?delay=2s&amp;repeatCount=1"/>
          <process ref="setStreamToBodyProcessor"/>
          <to uri="http4://localhost:8001/rest/test?bridgeEndpoint=true&amp;throwExceptionOnFailure=false&amp;chunked=false"/>
      </route>
      

      I am not only set option "chunked=false" to the camel-http4 producer endpoint URI, but also invoked the following code to explicitly set header "CamelHttpChunked" to false:

      exchange.getIn().setHeader(Exchange.HTTP_CHUNKED, false);
      

      However, the data sent to the server side from the camel-http4 producer endpoint was always chunked.

      When directly using Httpcomponents-client V4.5 API, it is possible to disable chunking. for instance, this example:
      https://github.com/apache/httpcomponents-client/blob/4.5.x/httpclient/src/examples/org/apache/http/examples/client/ClientChunkEncodedPost.java
      When modify the line #58 to

      reqEntity.setChunked(false);
      

      Then it is possible to disable chunking.

      Attachments

        Activity

          People

            ldemasi Luigi De Masi
            rhn-support-qluo Joe Luo
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: