[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpclient-commons-dev
Subject:    Re: svn commit: r708225 - in /httpcomponents/httpclient/trunk/module-client/src: main/java/org/apach
From:       sebb <sebbaz () gmail ! com>
Date:       2008-10-27 20:13:37
Message-ID: 25aac9fc0810271313y2dec7e2cxf6f13beee9fb766b () mail ! gmail ! com
[Download RAW message or body]

On 27/10/2008, olegk@apache.org <olegk@apache.org> wrote:
> Author: olegk
> Date: Mon Oct 27 09:08:27 2008
> New Revision: 708225
> 
> URL: http://svn.apache.org/viewvc?rev=708225&view=rev
> Log:
> Fixed broken #parse(HeaderElement[], CookieOrigin) method in the RFC2965Spec cookie \
> spec 

<snip/>

==============================================================================
> --- httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestCookieBestMatchSpec.java \
>                 (original)
> +++ httpcomponents/httpclient/trunk/module-client/src/test/java/org/apache/http/impl/cookie/TestCookieBestMatchSpec.java \
> Mon Oct 27 09:08:27 2008 @@ -43,6 +43,7 @@
> import org.apache.http.cookie.CookieOrigin;
> import org.apache.http.cookie.CookieSpec;
> import org.apache.http.cookie.MalformedCookieException;
> +import org.apache.http.cookie.SetCookie2;
> import org.apache.http.message.BasicHeader;
> 
> /**
> @@ -123,6 +124,36 @@
> }
> }
> 
> +    public void testCookieStandardCompliantParsingLocalHost() throws Exception {
> +        CookieSpec cookiespec = new BestMatchSpec();
> +        CookieOrigin origin = new CookieOrigin("localhost", 80, "/", false);
> +
> +        Header header = new BasicHeader("Set-Cookie", "special=\"abcdigh\"; \
> Version=1"); +
> +        List<Cookie> cookies = cookiespec.parse(header, origin);
> +        for (int i = 0; i < cookies.size(); i++) {
> +            Cookie cookie = cookies.get(i);
> +            cookiespec.validate(cookie, origin);
> +            assertEquals("localhost.local", cookie.getDomain());
> +            assertTrue(cookie instanceof SetCookie2);

This does not look right - the header is using Set-Cookie, not Set-Cookie2

S///

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic