You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2017/01/19 07:17:15 UTC
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
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 <ar...@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 <ar...@ncr.com>
Authored: Tue Jan 17 17:06:39 2017 +0100
Committer: Freeman Fang <fr...@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;
}
}