Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EBB8010E79 for ; Thu, 27 Feb 2014 18:07:48 +0000 (UTC) Received: (qmail 92932 invoked by uid 500); 27 Feb 2014 18:07:47 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 92869 invoked by uid 500); 27 Feb 2014 18:07:47 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 92862 invoked by uid 99); 27 Feb 2014 18:07:47 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Feb 2014 18:07:47 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D634892F1A8; Thu, 27 Feb 2014 18:07:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: [CXF-5339] Enabling the servlet stream test Date: Thu, 27 Feb 2014 18:07:46 +0000 (UTC) Repository: cxf Updated Branches: refs/heads/master 764404893 -> a7c4de45e [CXF-5339] Enabling the servlet stream test Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/a7c4de45 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a7c4de45 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a7c4de45 Branch: refs/heads/master Commit: a7c4de45e6d5b8747801b905c12adc3dce9ee028 Parents: 7644048 Author: Sergey Beryozkin Authored: Thu Feb 27 18:06:07 2014 +0000 Committer: Sergey Beryozkin Committed: Thu Feb 27 18:06:07 2014 +0000 ---------------------------------------------------------------------- .../apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java | 11 ++++++++++- .../jaxrs/websocket/JAXRSClientServerWebSocketTest.java | 1 - 2 files changed, 10 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/a7c4de45/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java ---------------------------------------------------------------------- diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java index 5c20748..ce5478d 100644 --- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java +++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java @@ -38,8 +38,17 @@ public class ServletOutputStreamFilter extends ServletOutputStream { @Override public void write(int b) throws IOException { - m.getExchange().put(AbstractHTTPDestination.RESPONSE_COMMITED, Boolean.TRUE); + setComittedStatus(); + os.write(b); + } + + @Override + public void write(byte[] b) throws IOException { + setComittedStatus(); os.write(b); } + private void setComittedStatus() { + m.getExchange().put(AbstractHTTPDestination.RESPONSE_COMMITED, Boolean.TRUE); + } } http://git-wip-us.apache.org/repos/asf/cxf/blob/a7c4de45/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketTest.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketTest.java index ec2bceb..be9058d 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketTest.java @@ -90,7 +90,6 @@ public class JAXRSClientServerWebSocketTest extends AbstractBusClientServerTestB } @Test - @Ignore public void testBookWithWebSocketServletStream() throws Exception { String address = "ws://localhost:" + PORT + "/web/bookstore";