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 A865C9B74 for ; Tue, 15 May 2012 14:42:21 +0000 (UTC) Received: (qmail 12705 invoked by uid 500); 15 May 2012 14:42:21 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 12600 invoked by uid 500); 15 May 2012 14:42:21 -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 12590 invoked by uid 99); 15 May 2012 14:42:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 May 2012 14:42:21 +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; Tue, 15 May 2012 14:42:20 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1D85523889BF; Tue, 15 May 2012 14:42:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1338733 - in /cxf/branches/2.5.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: Tue, 15 May 2012 14:41:59 -0000 To: commits@cxf.apache.org From: sergeyb@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120515144200.1D85523889BF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sergeyb Date: Tue May 15 14:41:59 2012 New Revision: 1338733 URL: http://svn.apache.org/viewvc?rev=1338733&view=rev Log: Merged revisions 1338730 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r1338730 | sergeyb | 2012-05-15 15:38:31 +0100 (Tue, 15 May 2012) | 1 line Updating HttpHeaders to recognize Cookie parameters marked with $, JIRA to be updated once it is up ........ Modified: cxf/branches/2.5.x-fixes/ (props changed) cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java Propchange: cxf/branches/2.5.x-fixes/ ------------------------------------------------------------------------------ Merged /cxf/trunk:r1338730 Propchange: cxf/branches/2.5.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java?rev=1338733&r1=1338732&r2=1338733&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java (original) +++ cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java Tue May 15 14:41:59 2012 @@ -100,7 +100,9 @@ public class HttpHeadersImpl implements if (value == null) { continue; } - List cs = getHeaderValues(HttpHeaders.COOKIE, value, getCookieSeparator()); + List cs = value.contains("$") + ? Collections.singletonList(value) + : getHeaderValues(HttpHeaders.COOKIE, value, getCookieSeparator()); for (String c : cs) { Cookie cookie = Cookie.valueOf(c); cl.put(cookie.getName(), cookie); Modified: cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java?rev=1338733&r1=1338732&r2=1338733&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java (original) +++ cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java Tue May 15 14:41:59 2012 @@ -250,6 +250,22 @@ public class HttpHeadersImplTest extends } @Test + public void testGetCookieWithAttributes() throws Exception { + + Message m = new MessageImpl(); + m.setExchange(new ExchangeImpl()); + MetadataMap headers = createHeaders(); + headers.putSingle(HttpHeaders.COOKIE, "$Version=1;a=b"); + m.put(Message.PROTOCOL_HEADERS, headers); + HttpHeaders h = new HttpHeadersImpl(m); + Map cookies = h.getCookies(); + assertEquals(1, cookies.size()); + Cookie cookie = cookies.get("a"); + assertEquals("b", cookie.getValue()); + assertEquals(1, cookie.getVersion()); + } + + @Test public void testGetCookiesWithComma() throws Exception { Message m = new MessageImpl();