Spring Integration
  1. Spring Integration
  2. INT-2006

http:inbound-gateway/outbound-gateway content-length needs recalculation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.5
    • Fix Version/s: 2.0.6, 2.1 M1
    • Component/s: None
    • Labels:
      None
    • Environment:
      all

      Description

      when the reply payload length differs from the request, need to recalculate and apply new content-length header value.

        Issue Links

          Activity

          Hide
          Oleg Zhurakousky added a comment -

          This will be a no-fix since its already been fix at the core spring level StringHttpMessageConverter. Waiting for feedback from SPR team to linke to the related SPR issue

          Show
          Oleg Zhurakousky added a comment - This will be a no-fix since its already been fix at the core spring level StringHttpMessageConverter. Waiting for feedback from SPR team to linke to the related SPR issue
          Hide
          Oleg Zhurakousky added a comment -

          This was fixed in Spring core v3.1 as part of the SPR-7909 but was not back-ported to 3.0, so there are two ways to address it.
          1. Upgrade Spring dependency to 3.1.*
          or
          2. Use HeaderEnricher before sending response:

          <int-http:inbound-gateway request-channel="receiveChannel"
                                    reply-channel="replyChannel"
                                    name="/receiveGateway"
                                    supported-methods="POST"/>
          <int:service-activator input-channel="receiveChannel" output-channel="replyChannel" expression="payload + ' from the other side'"/>
          	
          <int:header-enricher input-channel="replyChannel">
          	<int:header name="Content-Length" expression="payload.length()"/>
          </int:header-enricher>
          
          Show
          Oleg Zhurakousky added a comment - This was fixed in Spring core v3.1 as part of the SPR-7909 but was not back-ported to 3.0, so there are two ways to address it. 1. Upgrade Spring dependency to 3.1.* or 2. Use HeaderEnricher before sending response: < int -http:inbound-gateway request-channel= "receiveChannel" reply-channel= "replyChannel" name= "/receiveGateway" supported-methods= "POST" /> < int :service-activator input-channel= "receiveChannel" output-channel= "replyChannel" expression= "payload + ' from the other side'" /> < int :header-enricher input-channel= "replyChannel" > < int :header name= "Content-Length" expression= "payload.length()" /> </ int :header-enricher>

            People

            • Assignee:
              Oleg Zhurakousky
              Reporter:
              John Thoms
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: