cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject cxf git commit: CXF-5436: Properly handle SOAP responses whose Content-Type is missing, even if the response is chunked. This code already tests for 'Content-Length:0' to fast track empty responses, but chunked responses don't set this header, so test al
Date Thu, 19 Jan 2017 07:27:29 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 46b385f98 -> f71472681


CXF-5436: Properly handle SOAP responses whose Content-Type is missing, even if
the response is chunked.
This code already tests for 'Content-Length:0' to fast track empty responses, but
chunked responses don't set this header, so test also for 'Transfer-Encoding:chunked'.

Signed-off-by: Arnaud Jeansen <arnaud.jeansen@ncr.com>
(cherry picked from commit afd0d92017dea93138a0bb5d19ba25dde9f947bc)
(cherry picked from commit 83d23540ef09bac1ac775a154bec49a887ccadbc)


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/f7147268
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f7147268
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f7147268

Branch: refs/heads/3.0.x-fixes
Commit: f7147268180de1d6881b154967c2d8fcaf9362c7
Parents: 46b385f
Author: Arnaud Jeansen <arnaud.jeansen@ncr.com>
Authored: Tue Jan 17 17:06:39 2017 +0100
Committer: Freeman Fang <freeman.fang@gmail.com>
Committed: Thu Jan 19 15:20:26 2017 +0800

----------------------------------------------------------------------
 .../java/org/apache/cxf/interceptor/StaxInInterceptor.java     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/f7147268/core/src/main/java/org/apache/cxf/interceptor/StaxInInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/interceptor/StaxInInterceptor.java b/core/src/main/java/org/apache/cxf/interceptor/StaxInInterceptor.java
index 2a8682d..2893212 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/StaxInInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/StaxInInterceptor.java
@@ -104,8 +104,12 @@ public class StaxInInterceptor extends AbstractPhaseInterceptor<Message>
{
                     .getHeader(m, HttpHeaderHelper.CONTENT_LENGTH);
                 List<String> contentTE = HttpHeaderHelper
                     .getHeader(m, HttpHeaderHelper.CONTENT_TRANSFER_ENCODING);
+                List<String> transferEncoding = HttpHeaderHelper
+                    .getHeader(m, HttpHeaderHelper.TRANSFER_ENCODING);
                 if ((StringUtils.isEmpty(contentLen) || "0".equals(contentLen.get(0)))
-                    && StringUtils.isEmpty(contentTE)) {
+                    && StringUtils.isEmpty(contentTE)
+                    && (StringUtils.isEmpty(transferEncoding) 
+                    || !"chunked".equalsIgnoreCase(transferEncoding.get(0)))) {
                     return;
                 }
             }


Mime
View raw message