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:17:15 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 28f5b79d6 -> 83d23540e


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)


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

Branch: refs/heads/3.1.x-fixes
Commit: 83d23540ef09bac1ac775a154bec49a887ccadbc
Parents: 28f5b79
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:14:44 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/83d23540/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