hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1006) BrowserCompatSpec: don't trim " around cookie value
Date Tue, 03 Jan 2017 13:20:58 GMT

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

Oleg Kalnichevski commented on HTTPCLIENT-1006:

The spec either says something or it does not. If it says something inconsistently or ambiguously
different interpretations may arise depending on one's particular bias or context. The spec
clearly says cookies need to be sent back and cookie value may or may not be enclosed in quotes.
No, it does not say _anything_ about having to send cookies with quotes. The rest is up to
individual interpretations. Your interpretation is biased by your desire to push a work-around
for what in my opinion is clearly a server side bug to the client side library. My interpretation
is biased by my desire to keep some degree of consistency and compatibility between different
versions and different cookie policies of HttpClient.

And yes, let's just stop it right here as there nothing stopping you from building a "correcter"
or "righter" implementation of the spec and plugging it instead of the one shipped with HttpClient.

> BrowserCompatSpec: don't trim " around cookie value
> ---------------------------------------------------
>                 Key: HTTPCLIENT-1006
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1006
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (classic)
>    Affects Versions: 4.0.2
>            Reporter: Marc Guillemot
> If the server sends a cookie header like:
> Set-Cookie: first="hello world"
> then HttpClient parses it as cookie with value >hello world<, wrongly removing
the leading and trailing quotes. The incorrect quote removal occurs in BasicHeaderValueParser.

This message was sent by Atlassian JIRA

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

View raw message