Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quoting of values when stringifying Cookies [rt.cpan.org #78568] #21

Open
oalders opened this issue Mar 30, 2017 · 0 comments
Open

Quoting of values when stringifying Cookies [rt.cpan.org #78568] #21

oalders opened this issue Mar 30, 2017 · 0 comments

Comments

@oalders
Copy link
Member

oalders commented Mar 30, 2017

Migrated from rt.cpan.org#78568 (status was 'new')

Requestors:

From [email protected] on 2012-07-25 16:37:53:

Other open reports seem to be disregarded but will try anyway:

When stringifying a cookie the utility function
HTTP::Headers::Util::join_header_words is used which will in some cases
add double quotes around the values of key/values pairs in the cookies.

This is especially true for paths.

If, however, this stringified cookies are afterwards parsed again by
HTTP::Cookies::extract_cookies --> HTTP::Cookies::set_cookie these
cookies are rejected because the value for "path" does not start with
"/" (but with '"/').

This might be related to Bug #70721 but I´m not really sure about that.
colinnewell added a commit to cv-library/http-cookies that referenced this issue Aug 16, 2017
Fixes Set-Cookie (v1) style cookie parsing with regards to quoting.

This could do with more tests to check that we haven't goofed the
parsing but this should be able to deal with the fact that values can be
quoted.

Note that this also subtly changes the way we deal values we return as
it strips the " when it previously didn't.  These are the logical values
so I believe this is corect but it is a change of behaviour.

This may well affect issue libwww-perl#21 as we'll strip the " on read meaning we
should hopefully do the right thing now.
colinnewell added a commit to cv-library/http-cookies that referenced this issue Aug 16, 2017
Fixes Set-Cookie (v1) style cookie parsing with regards to quoting.

This could do with more tests to check that we haven't goofed the
parsing but this should be able to deal with the fact that values can be
quoted.

Note that this also subtly changes the way we deal values we return as
it strips the " when it previously didn't.  These are the logical values
so I believe this is corect but it is a change of behaviour.

This may well affect issue libwww-perl#21 as we'll strip the " on read meaning we
should hopefully do the right thing now.
colinnewell added a commit to cv-library/http-cookies that referenced this issue Aug 17, 2017
Fixes Set-Cookie (v1) style cookie parsing with regards to quoting.

This could do with more tests to check that we haven't goofed the
parsing but this should be able to deal with the fact that values can be
quoted.

Note that this also subtly changes the way we deal values we return as
it strips the " when it previously didn't.  These are the logical values
so I believe this is corect but it is a change of behaviour.

This may well affect issue libwww-perl#21 as we'll strip the " on read meaning we
should hopefully do the right thing now.
colinnewell added a commit to cv-library/http-cookies that referenced this issue Aug 17, 2017
Fixes Set-Cookie (v1) style cookie parsing with regards to quoting.

This could do with more tests to check that we haven't goofed the
parsing but this should be able to deal with the fact that values can be
quoted.

Note that this also subtly changes the way we deal values we return as
it strips the " when it previously didn't.  These are the logical values
so I believe this is corect but it is a change of behaviour.

This may well affect issue libwww-perl#21 as we'll strip the " on read meaning we
should hopefully do the right thing now.
colinnewell added a commit to cv-library/http-cookies that referenced this issue Aug 17, 2017
Fixes Set-Cookie (v1) style cookie parsing with regards to quoting.

Note that this also subtly changes the way we deal values we return as
it strips the " when it previously didn't.  These are the logical values
so I believe this is corect but it is a change of behaviour.

This may well affect issue libwww-perl#21 as we'll strip the " on read meaning we
should hopefully do the right thing now.
oalders pushed a commit that referenced this issue Oct 18, 2019
Fixes Set-Cookie (v1) style cookie parsing with regards to quoting.

Note that this also subtly changes the way we deal values we return as
it strips the " when it previously didn't.  These are the logical values
so I believe this is corect but it is a change of behaviour.

This may well affect issue #21 as we'll strip the " on read meaning we
should hopefully do the right thing now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant