This bug's been around a while (http://jaywiggins.com/2010/04/lost-sleep-over-json-and-rackpostbodycontenttypeparser/), but no-one has seemed to fixed it. So here it is.
The content type match on PostBodyContentTypeParser is a bit naïve, so I've changed it to use Rack::Request's content_type parsing, fixing a bug if the browser includes a charset or some-such media-type parameter.
Fix PostBodyContentTypeParser's content-type matching to support cont…
…ent-types with media-type parameters (such as 'application/json; charset=utf-8')
Fix PostBodyContentTypeParser's handling of empty JSON content bodies…
…, and cleaned up the spec
@mtodd any way I can help getting this one merged in?
I just made the same fix. It would be great to see it merged in.
Looks good. I'm really busy right now but I'll make sure I get to it this week.
Merged pull request #22 from toolmantim/master.
Fix PostBodyContentTypeParser's content-type matching
Please release this!
i wish i found this sooner:( rubygems still only has 1.1.0 lol.
Please release! Thank you