harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohanraj Loganathan (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6585) [classlib][luni]HTTPURLConnectionImpl fails to store Cookies set by the application
Date Thu, 15 Jul 2010 07:55:49 GMT
[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

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();      
        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.

View raw message