Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 32074 invoked from network); 6 Oct 2010 22:26:43 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Oct 2010 22:26:43 -0000 Received: (qmail 47713 invoked by uid 500); 6 Oct 2010 22:26:43 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 47672 invoked by uid 500); 6 Oct 2010 22:26:43 -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 47665 invoked by uid 99); 6 Oct 2010 22:26:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Oct 2010 22:26:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Wed, 06 Oct 2010 22:26:40 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 043C923889F7; Wed, 6 Oct 2010 22:26:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1005278 - in /cxf/branches/2.2.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ Date: Wed, 06 Oct 2010 22:26:18 -0000 To: commits@cxf.apache.org From: sergeyb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101006222619.043C923889F7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sergeyb Date: Wed Oct 6 22:26:18 2010 New Revision: 1005278 URL: http://svn.apache.org/viewvc?rev=1005278&view=rev Log: Merged revisions 1005275 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r1005275 | sergeyb | 2010-10-06 23:20:36 +0100 (Wed, 06 Oct 2010) | 1 line Minor update to MediaType handler ........ Modified: cxf/branches/2.2.x-fixes/ (props changed) cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProvider.java cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java Propchange: cxf/branches/2.2.x-fixes/ ------------------------------------------------------------------------------ svn:mergeinfo = /cxf/trunk:1005275 Propchange: cxf/branches/2.2.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProvider.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProvider.java?rev=1005278&r1=1005277&r2=1005278&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProvider.java (original) +++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProvider.java Wed Oct 6 22:26:18 2010 @@ -33,7 +33,7 @@ import javax.ws.rs.ext.RuntimeDelegate.H public class MediaTypeHeaderProvider implements HeaderDelegate { private static final Pattern COMPLEX_PARAMETERS = - Pattern.compile("(([\\w-]+=\"[^\"]*\")|([\\w-]+=[\\w-]+))"); + Pattern.compile("(([\\w-]+=\"[^\"]*\")|([\\w-]+=[\\w-/]+))"); public MediaType fromString(String mType) { Modified: cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java?rev=1005278&r1=1005277&r2=1005278&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java (original) +++ cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java Wed Oct 6 22:26:18 2010 @@ -255,15 +255,26 @@ public class JAXRSMultipartTest extends @Test public void testAddCollectionOfBooksWithProxy() { + doTestAddCollectionOfBooksWithProxy(true); + } + + @Test + public void testAddCollectionOfBooksWithProxyWithoutHeader() { + doTestAddCollectionOfBooksWithProxy(false); + } + + public void doTestAddCollectionOfBooksWithProxy(boolean addHeader) { String address = "http://localhost:" + PORT; MultipartStore client = JAXRSClientFactory.create(address, MultipartStore.class); - WebClient.client(client).header("Content-Type", "multipart/mixed;type=application/xml"); + if (addHeader) { + WebClient.client(client).header("Content-Type", "multipart/mixed;type=application/xml"); + } List books = new ArrayList(); books.add(new Book("CXF 1", 1L)); books.add(new Book("CXF 2", 2L)); - List books2 = client.addBooks(books); + List books2 = addHeader ? client.addBooks(books) : client.addBooksWithoutHeader(books); assertNotSame(books, books2); assertEquals(2, books2.size()); assertEquals(books.get(0).getId(), books2.get(0).getId()); Modified: cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java?rev=1005278&r1=1005277&r2=1005278&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java (original) +++ cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java Wed Oct 6 22:26:18 2010 @@ -296,6 +296,14 @@ public class MultipartStore { } @POST + @Path("/books/jaxbonly") + @Consumes("multipart/mixed;type=text/xml") + @Produces("multipart/mixed;type=text/xml") + public List addBooksWithoutHeader(List books) { + return addBooks(books); + } + + @POST @Path("/books/jaxbjson") @Produces("text/xml") public Response addBookJaxbJson(