This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch camel-2.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-2.22.x by this push:
     new 7ba1a86  CAMEL-13428: camel-undertow - Response with large data gets 
truncated on cloud
7ba1a86 is described below

commit 7ba1a86d7abbc0b0ba379d44e5ea0e8495a7d2a7
Author: Tadayoshi Sato <sato.tadayo...@gmail.com>
AuthorDate: Thu Apr 18 11:39:04 2019 +0900

    CAMEL-13428: camel-undertow - Response with large data gets truncated on 
cloud
---
 .../java/org/apache/camel/component/undertow/UndertowConsumer.java     | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowConsumer.java
 
b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowConsumer.java
index 8abc793..d2a3324 100644
--- 
a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowConsumer.java
+++ 
b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowConsumer.java
@@ -106,7 +106,7 @@ public class UndertowConsumer extends DefaultConsumer 
implements HttpHandler {
             
httpExchange.getResponseHeaders().put(ExchangeHeaders.CONTENT_LENGTH, 0);
             // do not include content-type as that would indicate to the 
caller that we can only do text/plain
             httpExchange.getResponseHeaders().put(Headers.ALLOW, 
allowedMethods);
-            httpExchange.getResponseSender().close();
+            httpExchange.endExchange();
             return;
         }
 
@@ -141,7 +141,6 @@ public class UndertowConsumer extends DefaultConsumer 
implements HttpHandler {
             ByteBuffer bodyAsByteBuffer = tc.convertTo(ByteBuffer.class, body);
             httpExchange.getResponseSender().send(bodyAsByteBuffer);
         }
-        httpExchange.getResponseSender().close();
     }
 
     /**

Reply via email to