Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 61286 invoked from network); 10 Mar 2010 18:02:34 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Mar 2010 18:02:34 -0000 Received: (qmail 83635 invoked by uid 500); 10 Mar 2010 18:02:03 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 83596 invoked by uid 500); 10 Mar 2010 18:02:03 -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 83589 invoked by uid 99); 10 Mar 2010 18:02:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Mar 2010 18:02:03 +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, 10 Mar 2010 18:02:00 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AE6AB238898B; Wed, 10 Mar 2010 18:01:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r921491 - in /cxf/branches/2.2.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java Date: Wed, 10 Mar 2010 18:01:39 -0000 To: commits@cxf.apache.org From: sergeyb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100310180139.AE6AB238898B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sergeyb Date: Wed Mar 10 18:01:39 2010 New Revision: 921491 URL: http://svn.apache.org/viewvc?rev=921491&view=rev Log: Merged revisions 921475 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r921475 | sergeyb | 2010-03-10 17:44:39 +0000 (Wed, 10 Mar 2010) | 1 line CXF-2462 : another fix to do with handling quoted header values ........ 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/HttpHeadersImpl.java cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java Propchange: cxf/branches/2.2.x-fixes/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Mar 10 18:01:39 2010 @@ -1 +1 @@ -/cxf/trunk:920741,920752,921014,921223 +/cxf/trunk:920741,920752,921014,921223,921475 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/HttpHeadersImpl.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java?rev=921491&r1=921490&r2=921491&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java (original) +++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java Wed Mar 10 18:01:39 2010 @@ -215,6 +215,11 @@ public class HttpHeadersImpl implements return newValues; } } + if (originalValue.startsWith("\"") && originalValue.endsWith("\"")) { + String actualValue = originalValue.length() == 2 ? "" + : originalValue.substring(1, originalValue.length() - 1); + return Collections.singletonList(actualValue); + } List values = new ArrayList(4); Matcher m = COMPLEX_HEADER_PATTERN.matcher(originalValue); while (m.find()) { Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java?rev=921491&r1=921490&r2=921491&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java (original) +++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java Wed Mar 10 18:01:39 2010 @@ -112,6 +112,23 @@ public class HttpHeadersImplTest extends assertEquals("Nonce=\"bar\"", values.get(2)); } + @Test + public void testGetHeaderWithQuotes3() throws Exception { + + Message m = control.createMock(Message.class); + m.get(Message.PROTOCOL_HEADERS); + MetadataMap headers = + createHeader("COMPLEX_HEADER", "\"value with space\""); + EasyMock.expectLastCall().andReturn(headers); + control.replay(); + HttpHeaders h = new HttpHeadersImpl(m); + List values = h.getRequestHeader("COMPLEX_HEADER"); + assertNotNull(values); + assertEquals(1, values.size()); + assertEquals("value with space", values.get(0)); + + } + @Test public void testGetHeaders() throws Exception {