[CXF-6638] Making sure a chunking is possible for PATCH/etc
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/24609223 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/24609223 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/24609223 Branch: refs/heads/2.7.x-fixes Commit: 246092234032a3f3de21b8be816a630fc28f14c1 Parents: 97aceb7 Author: Sergey Beryozkin <[email protected]> Authored: Tue Oct 13 17:00:39 2015 +0100 Committer: Sergey Beryozkin <[email protected]> Committed: Tue Oct 13 17:06:12 2015 +0100 ---------------------------------------------------------------------- .../main/java/org/apache/cxf/transport/http/HTTPConduit.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/24609223/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java ---------------------------------------------------------------------- diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java index c527ef4..18beb8f 100644 --- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java +++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java @@ -175,7 +175,7 @@ public abstract class HTTPConduit private static final String AUTO_REDIRECT_MAX_SAME_URI_COUNT = "http.redirect.max.same.uri.count"; private static final String HTTP_POST_METHOD = "POST"; - private static final String HTTP_PUT_METHOD = "PUT"; + private static final String HTTP_GET_METHOD = "GET"; private static final Set<String> KNOWN_HTTP_VERBS_WITH_NO_CONTENT = new HashSet<String>(Arrays.asList(new String[]{"GET", "HEAD", "OPTIONS", "TRACE"})); /** @@ -547,8 +547,7 @@ public abstract class HTTPConduit protected boolean isChunkingSupported(Message message, String httpMethod) { if (HTTP_POST_METHOD.equals(httpMethod)) { return true; - } - if (HTTP_PUT_METHOD.equals(httpMethod)) { + } else if (!HTTP_GET_METHOD.equals(httpMethod)) { MessageContentsList objs = MessageContentsList.getContentsList(message); if (objs != null && objs.size() > 0) { Object obj = objs.get(0);
