Fix PostBodyContentTypeParser's content-type matching #22

Merged
merged 2 commits into from Apr 30, 2011

Projects

None yet

8 participants

@toolmantim

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.

toolmantim added some commits Dec 13, 2010
@toolmantim toolmantim Fix PostBodyContentTypeParser's content-type matching to support cont…
…ent-types with media-type parameters (such as 'application/json; charset=utf-8')
921b7b3
@toolmantim toolmantim Fix PostBodyContentTypeParser's handling of empty JSON content bodies…
…, and cleaned up the spec
b723738
@toolmantim

nudge nudge

@mcastilho

nudge again.....

@toolmantim

@mtodd any way I can help getting this one merged in?

@sharner

I just made the same fix. It would be great to see it merged in.

@mtodd
Official Rack repositories member

Looks good. I'm really busy right now but I'll make sure I get to it this week.

@toolmantim

Thanks mate!

@mtodd mtodd added a commit that referenced this pull request Apr 30, 2011
@mtodd mtodd Merged pull request #22 from toolmantim/master.
Fix PostBodyContentTypeParser's content-type matching
3f004dd
@mtodd mtodd merged commit 3f004dd into rack:master Apr 30, 2011
@maccman

Please release this!

@bogardon

i wish i found this sooner:( rubygems still only has 1.1.0 lol.

@Soulou

Please release! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment