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 C6C65E543 for ; Thu, 24 Jan 2013 17:20:06 +0000 (UTC) Received: (qmail 82066 invoked by uid 500); 24 Jan 2013 17:20:06 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 82014 invoked by uid 500); 24 Jan 2013 17:20:06 -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 82007 invoked by uid 99); 24 Jan 2013 17:20:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jan 2013 17:20:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jan 2013 17:20:05 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7C9E323889DE; Thu, 24 Jan 2013 17:19:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1438082 - /cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java Date: Thu, 24 Jan 2013 17:19:46 -0000 To: commits@cxf.apache.org From: sergeyb@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130124171946.7C9E323889DE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sergeyb Date: Thu Jan 24 17:19:46 2013 New Revision: 1438082 URL: http://svn.apache.org/viewvc?rev=1438082&view=rev Log: Also updating the test Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java?rev=1438082&r1=1438081&r2=1438082&view=diff ============================================================================== --- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java (original) +++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java Thu Jan 24 17:19:46 2013 @@ -74,6 +74,7 @@ public class BookServer20 extends Abstra providers.add(new CustomReaderInterceptor()); providers.add(new CustomWriterInterceptor()); providers.add(new CustomDynamicFeature()); + providers.add(new PostMatchContainerRequestFilter()); sf.setProviders(providers); sf.setResourceProvider(BookStore.class, new SingletonResourceProvider(new BookStore(), true)); @@ -128,11 +129,12 @@ public class BookServer20 extends Abstra || !"true".equals(context.getProperty("DynamicPrematchingFilter"))) { throw new RuntimeException(); } - context.getHeaders().add("BOOK", "123"); + context.getHeaders().add("BOOK", "12"); } } + @PreMatching @BindingPriority(2) private static class PreMatchDynamicContainerRequestFilter implements ContainerRequestFilter { @@ -147,6 +149,19 @@ public class BookServer20 extends Abstra } + @CustomHeaderAdded + private static class PostMatchContainerRequestFilter implements ContainerRequestFilter { + + @Override + public void filter(ContainerRequestContext context) throws IOException { + String value = context.getHeaders().getFirst("Book"); + if (value != null) { + context.getHeaders().addFirst("Book", value + "3"); + } + } + + } + @BindingPriority(3) public static class PostMatchContainerResponseFilter implements ContainerResponseFilter {