litl/rauth — pull request #46 by marekrei (2012-10-06 01:47:02+00:00)
Title: Adding the data signature fix and updating unit tests

This is a fix for Issue #44. As per spec, the data (body) of the request is now normalized and included in the OAuth1 signature only if the Content-Type is set to 'application/x-www-form-urlencoded'. This also fixes compatibility with Smugmug photo uploading API.

I added this header to the existing unit tests where needed, and I created a new unit test for this case.

Also tested the examples where possible:
google.py, github.py : Not affected, as they use OAuth2
twitter-timeline-cli.py : Works with the modified code.
twitter-timeline-web.py, linkedin-web.py, facebook.py : I'm not familiar with Flask and wasn't able to properly test them.
linkedin-updates.py : Mostly works, but there is an error, even without this modification. A separate bug perhaps?:

Traceback (most recent call last):
File "linkedin-updates.py", line 41, in
current_share = update['updateContent']['person']['currentShare']
KeyError: 'currentShare'