From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.142.191.1 with SMTP id o1cs56666wff; Tue, 24 Nov 2009 10:22:21 -0800 (PST) Received: from mr.google.com ([10.91.210.12]) by 10.91.210.12 with SMTP id m12mr3790866agq.22.1259086940285 (num_hops = 1); Tue, 24 Nov 2009 10:22:20 -0800 (PST) Received: by 10.91.210.12 with SMTP id m12mr360772agq.22.1259086938909; Tue, 24 Nov 2009 10:22:18 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.213.3.206 with SMTP id 14ls441536ebo.0.p; Tue, 24 Nov 2009 10:22:17 -0800 (PST) Received: by 10.213.24.24 with SMTP id t24mr897501ebb.10.1259086937320; Tue, 24 Nov 2009 10:22:17 -0800 (PST) Received: by 10.213.24.24 with SMTP id t24mr897500ebb.10.1259086937292; Tue, 24 Nov 2009 10:22:17 -0800 (PST) Return-Path: Received: from mail-ew0-f224.google.com (mail-ew0-f224.google.com [209.85.219.224]) by gmr-mx.google.com with ESMTP id 18si568576ewy.12.2009.11.24.10.22.17; Tue, 24 Nov 2009 10:22:17 -0800 (PST) Received-SPF: neutral (google.com: 209.85.219.224 is neither permitted nor denied by best guess record for domain of ibc@aliax.net) client-ip=209.85.219.224; Received: by ewy24 with SMTP id 24so3583283ewy.26 for ; Tue, 24 Nov 2009 10:22:17 -0800 (PST) Received: by 10.213.1.7 with SMTP id 7mr6591394ebd.1.1259086936955; Tue, 24 Nov 2009 10:22:16 -0800 (PST) Return-Path: Received: from ibc-laptop.localnet ([212.230.46.89]) by mx.google.com with ESMTPS id 28sm2837889eyg.36.2009.11.24.10.22.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 10:22:15 -0800 (PST) From: =?utf-8?q?I=C3=B1aki_Baz_Castillo?= To: Rack Development Subject: Does Rack SPEC states that PATH_INFO must be cut after ";" (semicolon)? Date: Tue, 24 Nov 2009 19:22:12 +0100 User-Agent: KMail/1.12.2 (Linux/2.6.28-16-generic; KDE/4.3.2; x86_64; ; ) MIME-Version: 1.0 Message-Id: <200911241922.13218.ibc@aliax.net> X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.219.224 is neither permitted nor denied by best guess record for domain of ibc@aliax.net) smtp.mail=ibc@aliax.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/f48d0f995357a3de X-Message-Url: http://groups.google.com/group/rack-devel/msg/dfbeadfd10a3705f List-Unsubscribe: , List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, I've reported an issue for Thin HTTP server since it cuts PATH_INFO aft= er=20 finding a ";": http://github.com/macournoyer/thin/issues/closed/#issue/6 =2D-------------------------- If Thin receives a request with request line: GET /level1/level2;user=3Dalice/level3/doc.txt HTTP/1.1 then Thin cuts the URI path and leaves: env{"PATH_INFO"} =3D> "/level1/level2" Why? I've looked for such behavior in RFC 3986 and RFC 2616 but I don't fin= d a=20 reason to remove all the path content after ";". =2D-------------------------- A Thin developer closed the bug with the argument: =2D--------------------------- the env object is constructed according to Rack specs:=20 http://rack.rubyforge.org/doc/SPEC.html If you want the full URI look into env["REQUEST_URI"] =2D--------------------------- However I don't find in the SPEC where the PATH_INFO must be cut before the= =20 first semicolon char. I expect that is not correct at all since if ";" appears in the PATH (I mea= n=20 before the query) then it's a valid char for the PATH. In fact this issue is breaking my application since Rack receives requests= =20 containing ";" in the path like: GET /app/user%25b@id=3D%22ibc@domain.org;nat=3Dyes%22%2d which after hex-unescaping becomes: GET /app/user[@id=3D"ibc@domain.org;nat=3Dyes"] Thin (and Mongrel) creates PATH_INFO as follows: /app/user%25b@id=3D%22ibc@domain.org A workaround is forcing the client to escape the semicolon, but this violat= es=20 the application specs as ";" is not required to be encoded in the HTTP uri = (it=20 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=20 Thin/Mongrel implementation. Thanks a lot for any comment. =2D-=20 I=C3=B1aki Baz Castillo