hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rosen Anastasov (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1141) Cookie path is incorectly parsed
Date Thu, 03 Nov 2011 07:45:32 GMT

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

Rosen Anastasov commented on HTTPCLIENT-1141:

The client.getParams().setParameter(ClientPNames.COOKIE_POLICY, CookiePolicy.BROWSER_COMPATIBILITY)
didn't work. I still got the

ResponseProcessCookies - Cookie rejected: "[version: 0][name: debug_session][value: bea6d1e4-2303-4bbe-b8c8-32160cda3697][domain:
localhost][path: ""][expiry: null]". Illegal path attribute """". Path of origin: "/abc"

If I configure a custom CookieSpec that validates all cookies, the client fails to apply the
"" as path and is unable to reuse the session id specified. So the problem is not related
to validating as it is related to parsing correctly the two quotes. Older clients (4.0.1)
don't have this problem and are parsing the two quotes as empty string and this don't override
the default cookie configured path - "/". However this may be a problem of the tc Server -
incorrectly specified cookie path. But I was thinking more in direction that this is problem
of the HttpClient as this behavior has changed in recent versions.
> Cookie path is incorectly parsed
> --------------------------------
>                 Key: HTTPCLIENT-1141
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1141
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>         Environment: httpclient-4.1.2, httpcore-4.2-alpha2
>            Reporter: Rosen Anastasov
> A cookie (in my case the session cookie) is rejected because of incorrectly parsed cookie
path value.
> The response header is Set-Cookie: debug_session=3bf3dc0a-9207-484c-bf22-a4e4c882f205;
> And the reported failure is:
> ResponseProcessCookies - Cookie rejected: "[version: 0][name: debug_session][value: 3bf3dc0a-9207-484c-bf22-a4e4c882f205][domain:
localhost][path: ""][expiry: null]". Illegal path attribute """". Path of origin: "/abc"
> In older version of the client (4.0.1) the log looks like:
> ResponseProcessCookies - Cookie accepted: "[version: 0][name: debug_session][value: d8d0899b-e388-4f53-84b1-a6af36528340][domain:
localhost][path: /][expiry: null]".
> So I suppose that the issue is related with the cookie path parsing.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


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

View raw message