On 24 Nov 2009, at 09:41, Maciej Lotkowski wrote: > 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 = lambda { |env| >>> Rack::Request.new(env).GET >>> } >>> app.call(Rack::MockRequest.env_for("/kiszka?foo=&foo[option]=kiszka")) >> >> remove foo= 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 raised > because of invalid request. Combine this with the other issues in various request parsing discussions, I'm starting to think this wants to be pushed right into middleware. > > -- > Maciej Lotkowski