Ensure request.POST always raises EOFError on bad input
authorJonathan del Strother <jon.delStrother@audioboo.fm>
Tue, 21 May 2013 14:36:25 +0000 (15:36 +0100)
committerJonathan del Strother <jon.delStrother@audioboo.fm>
Tue, 21 May 2013 14:36:25 +0000 (15:36 +0100)
commit8d468ee7c737c19e6824c066ffcf45fdab8fc1b9
treeebf01574cd0bc5dc4eb34923077e942cb7a6f95a
parent838865f86ea538015f6c49e2c4935bab56533bdb
Ensure request.POST always raises EOFError on bad input

Before this fix, if you had a bad multipart request, request.POST would only raise EOFError the first time it was called, and would then return nil on subsequent invocations.  This would typically result in the cryptic "can't convert nil into Hash" as a result of calling request.params
lib/rack/request.rb
test/spec_request.rb