rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: Maciej Lotkowski <maciej.lotkowski@gmail.com>
To: rack-devel@googlegroups.com
Subject: Re: Invalid query string handling
Date: Tue, 24 Nov 2009 10:41:38 +0100	[thread overview]
Message-ID: <9b62ed110911240141v5223c470gccf2cedc50b1257a@mail.gmail.com> (raw)
In-Reply-To: <8253528E-60BA-4C08-AB8D-3FDA8E65E223@gmail.com>

On Tue, Nov 24, 2009 at 10:18 AM, James Tucker <jftucker@gmail.com> 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=<empty string> 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 <judofyr@gmail.com> 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.

-- 
Maciej Lotkowski

  reply	other threads:[~2009-11-24  9:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-23 12:41 Invalid query string handling Maciej Lotkowski
2009-11-24  9:18 ` James Tucker
2009-11-24  9:41   ` Maciej Lotkowski [this message]
2009-11-24 10:22     ` James Tucker
2009-11-24  9:25 ` Magnus Holm

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=9b62ed110911240141v5223c470gccf2cedc50b1257a@mail.gmail.com \
    --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).