From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.142.191.1 with SMTP id o1cs9823wff; Thu, 10 Dec 2009 14:30:41 -0800 (PST) Received: from mr.google.com ([10.141.124.1]) by 10.141.124.1 with SMTP id b1mr504608rvn.2.1260484241194 (num_hops = 1); Thu, 10 Dec 2009 14:30:41 -0800 (PST) Received: by 10.141.124.1 with SMTP id b1mr41284rvn.2.1260484239669; Thu, 10 Dec 2009 14:30:39 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.141.188.31 with SMTP id q31ls276916rvp.2.p; Thu, 10 Dec 2009 14:30:38 -0800 (PST) Received: by 10.141.124.1 with SMTP id b1mr85597rvn.1.1260484238466; Thu, 10 Dec 2009 14:30:38 -0800 (PST) Received: by 10.141.124.1 with SMTP id b1mr85595rvn.1.1260484238446; Thu, 10 Dec 2009 14:30:38 -0800 (PST) Return-Path: Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by gmr-mx.google.com with ESMTP id 1si243047pxi.5.2009.12.10.14.30.38; Thu, 10 Dec 2009 14:30:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of normalperson@yhbt.net designates 64.71.152.64 as permitted sender) client-ip=64.71.152.64; Received: from localhost (dcvr.yhbt.net [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPSA id EF80B1FA98; Thu, 10 Dec 2009 22:30:37 +0000 (UTC) Date: Thu, 10 Dec 2009 22:30:37 +0000 From: Eric Wong To: rack-devel@googlegroups.com Cc: Marc-Andre Cournoyer , mongrel-unicorn@rubyforge.org Subject: PATH_INFO spec (with regard to ";") Message-ID: <20091210223037.GB22867@dcvr.yhbt.net> MIME-Version: 1.0 User-Agent: Mutt/1.5.18 (2008-05-17) X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of normalperson@yhbt.net designates 64.71.152.64 as permitted sender) smtp.mail=normalperson@yhbt.net X-Original-Sender: normalperson@yhbt.net Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: X-Thread-Url: http://groups.google.com/group/rack-devel/t/5984cfeef920f24d X-Message-Url: http://groups.google.com/group/rack-devel/msg/466b2414440766e8 Sender: rack-devel@googlegroups.com List-Unsubscribe: , List-Subscribe: , Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, I've been notified privately that my changes for PATH_INFO in Unicorn 0.95.2 (which also got into Thin) may not be completely kosher, but I'm also asking for the Rack team to clarify PATH_INFO for HTTP parser implementers. Upon further reading (and also of the related-but-not-necessarily-true-for-Rack RFC 3875 section 4.1.5), I came across this: Unlike a URI path, the PATH_INFO is not URL-encoded, and cannot contain path-segment parameters. First off, Rack already directly contradicts the "the PATH_INFO is not URL-encoded" part, so Unicorn conforms to Rack specs over RFC 3875. *But* Rack does not address the "cannot contain path-segment parameters" part at all. So I (and probably a few other people) would like clarification on how to handle PATH_INFO when it comes to ";" Things to keep in mind: * URI.parse keeps ";" in URI::HTTP#path This point may not be relevant to us, as PATH_INFO and URI::HTTP#path should not necessarily be treated as equals * WEBrick keeps ";" in PATH_INFO * PEP333 (which Rack is based on) does not go into this level of detail regarding PATH_INFO and path segments * PATH_INFO in Rack appears to be based on CGI/1.1 (RFC 3875) * Again, Rack already contradicts the URL encoding rules of RFC 3875 for PATH_INFO, so there is precedence for Rack contradicting more of RFC 3875... * Rack::Request#full_path only looks at PATH_INFO + QUERY_STRING, this means many Rack applications may never see the ";" parts if Thin and Unicorn revert to old behavior. * Rack does not require REQUEST_URI, this is an extension Unicorn and Thin both carried over from Mongrel. * None of the official rack/rack-contrib middleware use REQUEST_URI Of course, in the grand scheme of things, hardly anybody uses ";" in paths. Yay for rare corner cases making our lives difficult. -- Eric Wong