idangazit/oauthlib — pull request #22 by calebbrown (2012-04-19 05:12:05+00:00)
Title: Add support for content_type so we can properly include or exclude the body in signatures.

According to [Section 3.4.1.3.1](http://tools.ietf.org/html/rfc5849#section-3.4.1.3.1) in rfc5849 the request body should only be added to the base string the signature is generated from if it has the content type `application/x-www-form-urlencoded`.

If it has another content type the body shouldn't be added to the base string. This is so that it is possible to support requests that include multipart file uploads or other content types.

These changes add support for passing through an optional `content_type` parameter which is then used to decide whether or not to include the body in the signature.

The alternative would be for a developer to maintain this logic outside of the library, but considering that this would be a fairly common pattern I think it best to include it in OAuthLib.

**note:**
The fix is in the last changesets

Like pull request #21 this one also includes everything from pull request #20.