From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.142.191.1 with SMTP id o1cs29496wff; Tue, 24 Nov 2009 01:42:02 -0800 (PST) Received: from mr.google.com ([10.140.177.4]) by 10.140.177.4 with SMTP id z4mr737377rve.19.1259055721882 (num_hops = 1); Tue, 24 Nov 2009 01:42:01 -0800 (PST) Received: by 10.140.177.4 with SMTP id z4mr85955rve.19.1259055720506; Tue, 24 Nov 2009 01:42:00 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.141.14.15 with SMTP id r15ls39114rvi.1.p; Tue, 24 Nov 2009 01:41:59 -0800 (PST) Received: by 10.140.192.7 with SMTP id p7mr1389043rvf.11.1259055719316; Tue, 24 Nov 2009 01:41:59 -0800 (PST) Received: by 10.140.192.7 with SMTP id p7mr1389042rvf.11.1259055719299; Tue, 24 Nov 2009 01:41:59 -0800 (PST) Return-Path: Received: from mail-pw0-f49.google.com (mail-pw0-f49.google.com [209.85.160.49]) by gmr-mx.google.com with ESMTP id 17si1328585pxi.7.2009.11.24.01.41.58; Tue, 24 Nov 2009 01:41:58 -0800 (PST) Received-SPF: pass (google.com: domain of maciej.lotkowski@gmail.com designates 209.85.160.49 as permitted sender) client-ip=209.85.160.49; Received: by mail-pw0-f49.google.com with SMTP id 21so5056750pwj.8 for ; Tue, 24 Nov 2009 01:41:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.117.6 with SMTP id p6mr646380wfc.343.1259055718141; Tue, 24 Nov 2009 01:41:58 -0800 (PST) In-Reply-To: <8253528E-60BA-4C08-AB8D-3FDA8E65E223@gmail.com> References: <4f56a124-ba2c-4336-989b-7a8336dc98f4@v37g2000vbb.googlegroups.com> <8253528E-60BA-4C08-AB8D-3FDA8E65E223@gmail.com> From: Maciej Lotkowski Date: Tue, 24 Nov 2009 10:41:38 +0100 Message-ID: <9b62ed110911240141v5223c470gccf2cedc50b1257a@mail.gmail.com> Subject: Re: Invalid query string handling To: rack-devel@googlegroups.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of maciej.lotkowski@gmail.com designates 209.85.160.49 as permitted sender) smtp.mail=maciej.lotkowski@gmail.com; dkim=pass (test mode) header.i=@gmail.com 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/72a3361c049286ac X-Message-Url: http://groups.google.com/group/rack-devel/msg/f310faf397784c51 List-Unsubscribe: , List-Subscribe: , Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Nov 24, 2009 at 10:18 AM, James Tucker wrote: > On 23 Nov 2009, at 12:41, Maciej Lotkowski wrote: > >> Hi, >> >> recently I stumbled upon a problem: >> >> require 'rubygems' >> require 'rack' >> require 'rack/mock' >> >> >> app =3D lambda { |env| >> =C2=A0Rack::Request.new(env).GET >> } >> app.call(Rack::MockRequest.env_for("/kiszka?foo=3D&foo[option]=3Dkiszka"= )) > > remove foo=3D from the front of your query string. It's not my query string, smeone just tries to flood my app with strange requests. But that's not the point. On Tue, Nov 24, 2009 at 10:25 AM, Magnus Holm wrote: > Maybe we should have a Rack::BadRequest, which can be raised when needed? That's what I mean. TypeError isn't an exception which you can expect to ra= ised because of invalid request. --=20 Maciej Lotkowski