Repository: cxf Updated Branches: refs/heads/master d786ec0f0 -> ef16fd3cc
[CXF-7123] Setting the exchange in chain complete property if it is 202 and no processing is required Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ef16fd3c Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ef16fd3c Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ef16fd3c Branch: refs/heads/master Commit: ef16fd3ccf4811b3321e1cdb245298a54f89817d Parents: d786ec0 Author: Sergey Beryozkin <[email protected]> Authored: Thu Nov 3 12:39:00 2016 +0000 Committer: Sergey Beryozkin <[email protected]> Committed: Thu Nov 3 12:39:00 2016 +0000 ---------------------------------------------------------------------- .../main/java/org/apache/cxf/transport/http/HTTPConduit.java | 1 + .../apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java | 8 ++++++++ 2 files changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/ef16fd3c/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 e5aa543..882ad5c 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 @@ -1636,6 +1636,7 @@ public abstract class HTTPConduit cc.handleResponse(null, null); } } + exchange.put("IN_CHAIN_COMPLETE", Boolean.TRUE); exchange.setInMessage(inMessage); return; } http://git-wip-us.apache.org/repos/asf/cxf/blob/ef16fd3c/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java index 8726685..e7dd9b5 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java @@ -778,6 +778,14 @@ public class JAXRSClientServerBookTest extends AbstractBusClientServerTestBase { } @Test + public void testOnewayWebClient2() throws Exception { + WebClient client = WebClient.create("http://localhost:" + PORT + "/bookstore/oneway"); + Response r = client.post(null); + assertEquals(202, r.getStatus()); + assertFalse(r.getHeaders().isEmpty()); + } + + @Test public void testBookWithSpace() throws Exception { WebClient client = WebClient.create("http://localhost:" + PORT + "/bookstore/").path("the books/123"); Book book = client.get(Book.class);
