Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-8194

Set Content-Length on Http Request

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.8.0, 7.8.0-alpha4
    • None
    • engine

      Problem

      Camunda Connect does not set the content length of the HTTP requests, which leads to requests which contain the header Transfer-Encoding: chunked. Some REST/Soap endpoint do not support chunked requests and expect and request with Content-Length set. The Connect API only provides a single method to set the payload HttpBaseRequest#payload(String payload) which accepts a String as payload. So Connect is aware of the content size and could always set the content-length to prevent chunked requests. Chunked requests should only be used if the payload size is not known during request creation or the payload should not be buffered before sending the request. Both is not true for the current Connect implementation.

      Solution

      Specify content length on creation of InputStreamEntity.

      Forum threads with this problem

      https://forum.camunda.org/t/disable-sending-the-chunked-request-from-camunda/857
      https://forum.camunda.org/t/web-service-call-from-camunda-to-external-service-using-rest-post-method/725
      https://forum.camunda.org/t/camunda-http-soap-connector/4648

        This is the controller panel for Smart Panels app

              yana.vasileva Yana Vasileva
              sebastian.menski Sebastian Menski
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: