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

Set Content-Length on Http Request

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.8.0, 7.8.0-alpha4
    • Component/s: engine
    • Labels:

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: