hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r708225 - in /httpcomponents/httpclient/trunk/module-client/src: main/java/org/apache/http/impl/cookie/ test/java/org/apache/http/impl/cookie/
Date Mon, 27 Oct 2008 20:13:37 GMT
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


Mime
View raw message