nicolaiarocci/eve — pull request #53 by ondrowan (2013-05-08 18:01:26+00:00)
Title: [WIP] Payload now correctly splits Content-Type

Commit message should be clear, but I'm going to clarify the case anyway:

I was finally going through tutorial of Eve, but instead of `curl` I used [`httpie`](https://github.com/jkbr/httpie) which automatically appends `; charset=utf-8` to `Content-Type` header. `payload` method wasn't taking this scenario into account and I was getting 400s.

The fix is not that tricky and tests are passing, but I found out it's false sense of security. There's probably something wrong with Werkzeug's test client. It seems it's somehow converting any `Content-Type` to `application/x-www-form-urlencoded`. So my new test and JSON tests are most likely not testing what they should. It's all ok inside Werkzeug until this point: https://github.com/mitsuhiko/werkzeug/blob/master/werkzeug/test.py#L745, then some black magic takes place and I have no idea what happens to these data. I lost good deal of the afternoon digging into it and I think I might be just missing something obvious, so I'm passing it here.

Just to further clarify, the fix actually works for me if I test it manually, just unit tests are acting up.