#38 ✓resolved
Rob Anderton

IndexError in normalize_params

Reported by Rob Anderton | March 18th, 2009 @ 01:44 PM | in 1.0

The normalize_params method of Rack::Utils throws an IndexError exception on params of the form "foo[bar]=value1&foo[bar]roo=value2". My original thought was to silently discard these parameters (I'm using Rails and its what it used to do pre-rack) however looking at the code it seems that raising a TypeError exception is more appropriate.

Attached is a patch that fixes this problem. It also adds messages to the exceptions which should be helpful when debugging and it adds an extra test case for part of the normalize_params method that wasn't previously covered.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Attachments

Pages