title: Spring Integration HttpOutbound throws triggers ErrorChannel when http header ETag: 1 received from the server
body: <p>Sorry I Miss understood the problem.</p>
  <p>The issue is ETag Header.</p>
  <p>This is header response when i make curl request to server.</p>
  <pre><code>Content-Length: 228
  Content-Type: application/json
  X-ORACLE-DMS-ECID: 644f1021-bee9-4a11-b8ab-ab8557a746c0-00000f2c
  ETag: 1
  X-ORACLE-DMS-RID: 0
  </code></pre>
  <p>This is StackTrace:</p>
  <pre><code>java.lang.IllegalArgumentException: Invalid ETag: does not start with W/ or &quot;
      at org.springframework.util.Assert.isTrue(Assert.java:121) ~[spring-core-5.3.9.jar:5.3.9]
      at org.springframework.http.HttpHeaders.setETag(HttpHeaders.java:1039) ~[spring-web-5.3.9.jar:5.3.9]
      at org.springframework.integration.http.support.DefaultHttpHeaderMapper.setETag(DefaultHttpHeaderMapper.java:588) ~[spring-integration-http-5.5.2.jar:5.5.2]
      at org.springframework.integration.http.support.DefaultHttpHeaderMapper.setHttpHeader(DefaultHttpHeaderMapper.java:406) ~[spring-integration-http-5.5.2.jar:5.5.2]
      at org.springframework.integration.http.support.DefaultHttpHeaderMapper.fromHeaders(DefaultHttpHeaderMapper.java:377) ~[spring-integration-http-5.5.2.jar:5.5.2]
      at org.springframework.integration.http.support.DefaultHttpHeaderMapper.fromHeaders(DefaultHttpHeaderMapper.java:75) ~[spring-integration-http-5.5.2.jar:5.5.2]
      at org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport.setupResponseAndConvertReply(HttpRequestHandlingEndpointSupport.java:427) ~[spring-integration-http-5.5.2.jar:5.5.2]
      at org.springframework.integration.http.inbound.HttpRequestHandlingMessagingGateway.handleRequest(HttpRequestHandlingMessagingGateway.java:114) ~[spring-integration-http-5.5.2.jar:5.5.2]
      at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:52) ~[spring-webmvc-5.3.9.jar:5.3.9]
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1064) ~[spring-webmvc-5.3.9.jar:5.3.9]
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) ~[spring-webmvc-5.3.9.jar:5.3.9]
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.9.jar:5.3.9]
      at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.3.9.jar:5.3.9]
  
  </code></pre>
  <p>This is my sample code, where service is activated when message is sent to channel 'request.input' if the remote server respond with header ETag: 1 exception is raised.</p>
  <pre><code>@Value(&quot;${auth.token}&quot;)
  private String authToken;
  
  @Value(&quot;${auth.key}&quot;)
  private String authKey;
  
  @Value(&quot;${url}&quot;)
  private String url;
  
  
  @Bean
  public IntegrationFlow outRequest() {
      return IntegrationFlows.from(Http.inboundGateway(&quot;/request&quot;)
              .requestMapping(m-&gt; m.methods(HttpMethod.POST))
              .requestPayloadType(RequestPayloadDTO.class).errorChannel(&quot;errorChannel&quot;))
              .transform(requestTransformer)
              .gateway(&quot;request.input&quot;)
              .get();
  }
  
  
  @Bean
  public IntegrationFlow request() {
      return flow -&gt; flow.enrichHeaders((headerEnricherSpec -&gt; {
          headerEnricherSpec.header(authKey,authToken,true);
      })).handle(Http.outboundGateway(url)
              .mappedRequestHeaders(authKey)
              .httpMethod(HttpMethod.POST)
              .expectedResponseType(ResponseDTO.class)
      ).transform(responseTransformer);
  }
  
  
  @MessagingGateway(defaultRequestChannel = &quot;request.input&quot;)
  public interface RequestGateway {
      ResponseDTO exchange(String out);
  }
  
  
  </code></pre>