You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2010/09/03 13:03:36 UTC

[jira] Updated: (HARMONY-6585) [classlib][luni]HTTPURLConnectionImpl fails to store Cookies set by the application

     [ https://issues.apache.org/jira/browse/HARMONY-6585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison updated HARMONY-6585:
---------------------------------

    Fix Version/s:     (was: 6.0M3)

> [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
>         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.