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 Wed, 28 Dec 2016 17:21:58 GMT

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

Oleg Kalnichevski commented on HTTPCLIENT-1006:

What you and Liang are saying is directly contradictory with RFC 2616 section 2.2 and section
4.2 that define {{quoted-string}} and general rules of escaping special characters inside
header elements defined thereby. Even on a basic common sense level quotes as a part of cookie
value makes _zero_ sense as they have universally been intended as an escape mechanism in
HTTP related protocols.

RFC 6265 however does define its own grammar for cookie values without referring to {{quoted-string}}.
I'll re-read RFC 6265 and see if there are any explicit statements about escaping special
characters in cookie elements.  


> 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