From: "Iñaki Baz Castillo" <ibc@aliax.net>
To: Rack Development <rack-devel@googlegroups.com>
Subject: Does Rack SPEC states that PATH_INFO must be cut after ";" (semicolon)?
Date: Tue, 24 Nov 2009 19:22:12 +0100 [thread overview]
Message-ID: <200911241922.13218.ibc@aliax.net> (raw)
Hi, I've reported an issue for Thin HTTP server since it cuts PATH_INFO after
finding a ";":
http://github.com/macournoyer/thin/issues/closed/#issue/6
---------------------------
If Thin receives a request with request line:
GET /level1/level2;user=alice/level3/doc.txt HTTP/1.1
then Thin cuts the URI path and leaves:
env{"PATH_INFO"} => "/level1/level2"
Why? I've looked for such behavior in RFC 3986 and RFC 2616 but I don't find a
reason to remove all the path content after ";".
---------------------------
A Thin developer closed the bug with the argument:
----------------------------
the env object is constructed according to Rack specs:
http://rack.rubyforge.org/doc/SPEC.html
If you want the full URI look into env["REQUEST_URI"]
----------------------------
However I don't find in the SPEC where the PATH_INFO must be cut before the
first semicolon char.
I expect that is not correct at all since if ";" appears in the PATH (I mean
before the query) then it's a valid char for the PATH.
In fact this issue is breaking my application since Rack receives requests
containing ";" in the path like:
GET /app/user%25b@id=%22ibc@domain.org;nat=yes%22%2d
which after hex-unescaping becomes:
GET /app/user[@id="ibc@domain.org;nat=yes"]
Thin (and Mongrel) creates PATH_INFO as follows:
/app/user%25b@id=%22ibc@domain.org
A workaround is forcing the client to escape the semicolon, but this violates
the application specs as ";" is not required to be encoded in the HTTP uri (it
could be encoded or not, but it's not required).
IMHO it's a bug in Rack SPEC (even if I don't find that point) or in
Thin/Mongrel implementation.
Thanks a lot for any comment.
--
Iñaki Baz Castillo <ibc@aliax.net>
next reply other threads:[~2009-11-24 18:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-24 18:22 Iñaki Baz Castillo [this message]
2009-11-30 16:27 ` Does Rack SPEC states that PATH_INFO must be cut after ";" (semicolon)? Iñaki Baz Castillo
2009-11-30 23:31 ` Hongli Lai
2009-12-01 0:42 ` Iñaki Baz Castillo
2009-12-05 22:54 ` Scytrin dai Kinthra
2009-12-05 23:15 ` Iñaki Baz Castillo
2009-12-07 2:32 ` Eric Wong
2009-12-07 9:53 ` Iñaki Baz Castillo
[not found] ` <8108c6090912061939h7f2ae70rac675219ed08f2e8@mail.gmail.com>
2009-12-07 11:08 ` masayoshi takahashi
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=200911241922.13218.ibc@aliax.net \
--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).