From: Scytrin dai Kinthra <scytrin@gmail.com>
To: rack-devel@googlegroups.com
Subject: Re: Cookie Handling [rack/rack GH-8]
Date: Wed, 2 Dec 2009 09:19:10 -0800 [thread overview]
Message-ID: <5a9d52bd0912020919re8d74ddu6c40a35996c57eda@mail.gmail.com> (raw)
In-Reply-To: <5a9d52bd0912020917q180168a3t48343dcc1f7fba1@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]
I can see about fixing this today if no one else is claiming it.
--
stadik.net
On Dec 2, 2009 5:14 AM, "Christian Neukirchen" <chneukirchen@gmail.com>
wrote:
mhat sent you a message.
--------------------
Rack appears to incorrectly handle cookies with values that are
quoted-strings. RFC2109 states that a value is a word and a may either
a token or a quoted-string. Rack is handling quoted-string values as
if they were tokens. Naturally this causes some problems.
It looks like the issue stems from the fact that Rack::Request#cookies
uses Rack::Utils.parse_query. What parse_query does makes sense for
parameters, but I think it is incorrect for cookie values.
If I have a cookie like so:
POST /acme/shipping HTTP/1.1
Cookie: $Version="1";
Customer="WILE_E_COYOTE"; $Path="/acme";
Part_Number="Rocket_Launcher_0001"; $Path="/acme"
The ruby String value for key Customer should be "WILE_E_COYOTE"
rather than "\"WILE_E_COYOTE\"".
You can imagine how this handling of quoted strings leads to
interoperability problems with other application stacks.
View this Issue online: http://github.com/rack/rack/issues#issue/8
--------------------
[-- Attachment #2: Type: text/html, Size: 1600 bytes --]
next prev parent reply other threads:[~2009-12-02 17:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-02 13:13 Cookie Handling [rack/rack GH-8] Christian Neukirchen
[not found] ` <5a9d52bd0912020917q180168a3t48343dcc1f7fba1@mail.gmail.com>
2009-12-02 17:19 ` Scytrin dai Kinthra [this message]
[not found] ` <5a9d52bd0912031555y5acedb5aua57038aa8a53a070@mail.gmail.com>
2009-12-03 23:56 ` Scytrin dai Kinthra
2009-12-04 1:21 ` Joshua Peek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://groups.google.com/group/rack-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5a9d52bd0912020919re8d74ddu6c40a35996c57eda@mail.gmail.com \
--to=rack-devel@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).