Please sign in to comment.
Set 'Content-Type: application/json' [Fixes #7]
The issue was that Net::HTTP sets the default content-type to application/x-www-form-encoded, which caused GitHub's servers to percent-decode the incoming content. This meant that if a file contained a % that was not followed by two hex digits, you could not upload a gist. Setting the right content-type header fixes this. Thanks to @rking for the data to replicate this problem.
- Loading branch information...