[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15055154#comment-15055154
 ] 

Philippe Mouawad commented on HTTPCLIENT-1705:
----------------------------------------------

Hi [~olegk],
I am not an HTTP specialist as you are so I may be wrong, but I read "Cookies 
with longer paths are listed before cookies with shorter paths." , so I think 
there is a bug.

But, reading https://tools.ietf.org/html/rfc6265#5.4:
{code:none}
The user agent SHOULD sort the cookie-list in the following
       order:

       *  Cookies with longer paths are listed before cookies with
          shorter paths.

       *  Among cookies that have equal-length path fields, cookies with
          earlier creation-times are listed before cookies with later
          creation-times.

       NOTE: Not all user agents sort the cookie-list in this order, but
       this order reflects common practice when this document was
       written, and, historically, there have been servers that
       (erroneously) depended on this order.
{code}


> CookieSpecs#formatCookies ordering change between HC3 and HC4
> -------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1705
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1705
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.5.1
>            Reporter: Philippe Mouawad
>         Attachments: HTTPCLIENT-1705.patch
>
>
> Following:
> http://mail-archives.apache.org/mod_mbox/hc-httpclient-users/201512.mbox/%3CCAH9fUpYn6BDFUMA6qq-q4ioFsSQvd%2BFrLJCiSJXaAxnw1ZsBtg%40mail.gmail.com%3E
> When migrating from HTTPCLIENT3 to HC4.5 (issue is also in HC4.2.3), we have 
> a change in behaviour of 
> org.apache.http.client.config.CookieSpec#formatCookies compared to 
> org.apache.commons.httpclient.cookie.CookieSpec#formatCookies.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to