[ 
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.  

Oleg

> 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
(v6.3.4#6332)

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

Reply via email to