Bug 62015

Summary: Quotes in cookie values are stripped
Product: JMeter Reporter: HB <harald.demian.brunner>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: REOPENED ---    
Severity: normal CC: p.mouawad
Priority: P2    
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description HB 2018-01-18 14:32:43 UTC
When a server sends a cookie containing JSON, this is a problem, e.g. the server may send this header:

    Set-Cookie: x={"Language":"en","Value":10}; expires=Mon, 16-Jul-2018 22:00:00 GMT; path=/

Then on the next request it will send the cookie as:

    ...; x="{Language:de,Value:10}"; ...

This of course fails to parse on the server.

(When i tried to work around this problem by setting the cookie manually via script or cookie manager config element, the quotes ended up on the server in escaped form (i.e. with backslash characters before the inner quotes.))
Comment 1 Felix Schumacher 2018-01-19 11:04:42 UTC
Double quotes (DQUOTES) are not valid in a cookie value according to RFC 6525 (apart around the value). The JMeter Cookie Managers default is to use RFC 6525.

You can try to  use another Cookie Policy and see, if that helps.
Comment 2 HB 2018-01-25 08:16:54 UTC
The "netscape" policy works. Thought i had tried changing that but apparently did not. Thanks.
Comment 3 Kevin 2018-03-29 07:39:25 UTC
Same issue with double quotes in cookie values.
I tried all cookie policies in HTTP Cookie Manager, the thread always failed.
Can anyone take a look on issue or give some solutions to resolve this issue?
Comment 4 Kevin 2018-03-29 07:40:30 UTC
(In reply to HB from comment #2)
> The "netscape" policy works. Thought i had tried changing that but
> apparently did not. Thanks.

Hi HB,

If you resolve this issue at last?