Bug 62015 - Quotes in cookie values are stripped
Summary: Quotes in cookie values are stripped
Status: REOPENED
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 3.3
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-18 14:32 UTC by HB
Modified: 2018-03-29 07:40 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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?