Created
August 26, 2009 20:50
-
-
Save semifor/175831 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Net/Twitter/Core.pm b/lib/Net/Twitter/Core.pm | |
index f52207c..3011089 100644 | |
--- a/lib/Net/Twitter/Core.pm | |
+++ b/lib/Net/Twitter/Core.pm | |
@@ -86,7 +86,7 @@ sub _authenticated_request { | |
my $msg; | |
- $_ = encode('utf-8', $_) for values %$args; | |
+ $_ = encode('utf-8', $_) for keys %$args, values %$args; | |
if ( $http_method eq 'GET' ) { | |
$uri->query_form($args); | |
diff --git a/lib/Net/Twitter/Role/OAuth.pm b/lib/Net/Twitter/Role/OAuth.pm | |
index e38f999..3c6249c 100644 | |
--- a/lib/Net/Twitter/Role/OAuth.pm | |
+++ b/lib/Net/Twitter/Role/OAuth.pm | |
@@ -181,7 +181,7 @@ override _authenticated_request => sub { | |
} | |
elsif ( $http_method eq 'POST' ) { | |
delete $args->{source}; # not necessary with OAuth requests | |
- $_ = encode('utf-8', $_) for values %$args; | |
+ $_ = encode('utf-8', $_) for keys %$args, values %$args; | |
$msg = POST($uri, $args); | |
} | |
else { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment