Spring Integration
  1. Spring Integration
  2. INT-1751

Expose mapped-request/response-headers attributes on HttpInboundGateway

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: Adapters
    • Labels:
      None

      Description

      Currently the only way to map custom headers is to register custom instance of HeaderMapper:

      <int-http:inbound-gateway request-channel="receiveChannel"
                                name="/receiveGateway"
                                extract-reply-payload="true"
                                header-mapper="headerMapper"/>
                                
      <bean id="headerMapper" class="org.springframework.integration.http.support.DefaultHttpHeaderMapper">
          	<property name="outboundHeaderNames" value="HTTP_RESPONSE_HEADERS,X-*"/>
      </bean>
      

      . . . while the outbound gateway has those convenient attributes. Should be symmetrical.

        Activity

        Hide
        Oleg Zhurakousky added a comment -

        You can now set mapped-request/response-headers as attribute on Http Inbound gateways/adapters, the same way as oon the outbound

        <int-http:inbound-gateway request-channel="receiveChannel"
                                  name="/receiveGateway"
                                  extract-reply-payload="true"
                                  mapped-request-headers="HTTP_REQUEST_HEADERS,X-*"/>
        
        Show
        Oleg Zhurakousky added a comment - You can now set mapped-request/response-headers as attribute on Http Inbound gateways/adapters, the same way as oon the outbound < int -http:inbound-gateway request-channel= "receiveChannel" name= "/receiveGateway" extract-reply-payload= " true " mapped-request-headers= "HTTP_REQUEST_HEADERS,X-*" />
        Hide
        Oleg Zhurakousky added a comment -

        Need to flip the way inbound/outboundHeaderNames are set on DefaultHttpHeaderMapper

        Show
        Oleg Zhurakousky added a comment - Need to flip the way inbound/outboundHeaderNames are set on DefaultHttpHeaderMapper

          People

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

            Dates

            • Created:
              Updated:
              Resolved: