Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 2982 invoked from network); 15 Jul 2010 07:58:16 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Jul 2010 07:58:16 -0000 Received: (qmail 84087 invoked by uid 500); 15 Jul 2010 07:58:16 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 84013 invoked by uid 500); 15 Jul 2010 07:58:15 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 84005 invoked by uid 99); 15 Jul 2010 07:58:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jul 2010 07:58:15 +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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jul 2010 07:58:12 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o6F7vn9F017229 for ; Thu, 15 Jul 2010 07:57:50 GMT Message-ID: <33100598.392691279180669619.JavaMail.jira@thor> Date: Thu, 15 Jul 2010 03:57:49 -0400 (EDT) From: "Mohanraj Loganathan (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-6585) [classlib][luni]HTTPURLConnectionImpl fails to store Cookies set by the application In-Reply-To: <13863945.392671279180549736.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-6585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mohanraj Loganathan updated HARMONY-6585: ----------------------------------------- Attachment: httpCookieHandler.diff Attaching patch for the above issue. test.support.Support_jetty.java added few lines inorder to test cookie functionality with HttpURLConnectionImpl. > [classlib][luni]HTTPURLConnectionImpl fails to store Cookies set by the application > ----------------------------------------------------------------------------------- > > Key: HARMONY-6585 > URL: https://issues.apache.org/jira/browse/HARMONY-6585 > Project: Harmony > Issue Type: Bug > Components: Classlib > Affects Versions: 6.0M3 > Environment: windows and linux > Reporter: Mohanraj Loganathan > Fix For: 6.0M3 > > Attachments: httpCookieHandler.diff > > > HttpURLConnectionImpl fails to store the cookie's set by the application. Due to which CookieManager returns null values while trying to retrieve the cookies. > Consider the testcase below: > public void testCookie1() throws Exception{ > //start tomcat server and try to invoke CookieExample servlet which sets the cookie passed to it. > String urlValue = http://localhost:8080/examples/servlets/servlet/CookieExample?cookiename=xyz&cookievalue=amkm"; > CookieManager myManager = new CookieManager(); > CookieHandler.setDefault(myManager); > myManager.setCookiePolicy(CookiePolicy.ACCEPT_ALL); > URL url = new URL(urlValue); > HttpURLConnection conn = (HttpURLConnection)url.openConnection(); > assertEquals("Connet Error:"+ urlValue,200,conn.getResponseCode()); > assertTrue("Should have been received atleast one Cookies",myManager.getCookieStore().getURIs().size()>=1); > assertTrue("Should have been received atleast one Cookies",myManager.getCookieStore().getCookies().size()>=1); > } > Above test fails with Harmony and passes in RI. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.