abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r1228259 - /abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/OAuthUtil.java
Date Fri, 06 Jan 2012 16:48:52 GMT
Author: jmsnell
Date: Fri Jan  6 16:48:52 2012
New Revision: 1228259

URL: http://svn.apache.org/viewvc?rev=1228259&view=rev
Log:
url encode the parameters per the spec requirement

Modified:
    abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/OAuthUtil.java

Modified: abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/OAuthUtil.java
URL: http://svn.apache.org/viewvc/abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/OAuthUtil.java?rev=1228259&r1=1228258&r2=1228259&view=diff
==============================================================================
--- abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/OAuthUtil.java (original)
+++ abdera/abdera2/common/src/main/java/org/apache/abdera2/common/http/OAuthUtil.java Fri
Jan  6 16:48:52 2012
@@ -244,10 +244,10 @@ public final class OAuthUtil {
       Authentication.Builder builder = 
         Authentication.make()
           .scheme("OAuth");
-      if (include_additional)
-        builder.params(map);
-      else
-        builder.params(map, is_oauth_param);
+      for (Map.Entry<String, String> entry : map.entrySet()) {
+        if (include_additional || is_oauth_param.apply(entry))
+          builder.param(entry.getKey(), escaped(entry.getValue()));
+      }
       if (signature != null)
         builder.param("oauth_signature", signature);
       return builder.get();



Mime
View raw message