incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [2/3] git commit: Adding custom headers to upload
Date Thu, 09 Feb 2012 23:07:16 GMT
Adding custom headers to upload


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/044a61d8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/044a61d8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/044a61d8

Branch: refs/heads/master
Commit: 044a61d8816e04875a542088537eed8ead5d706a
Parents: ee4c915
Author: Joe Bowser <bowserj@apache.org>
Authored: Thu Feb 9 15:02:13 2012 -0800
Committer: Joe Bowser <bowserj@apache.org>
Committed: Thu Feb 9 15:02:13 2012 -0800

----------------------------------------------------------------------
 framework/src/org/apache/cordova/FileTransfer.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/044a61d8/framework/src/org/apache/cordova/FileTransfer.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/FileTransfer.java b/framework/src/org/apache/cordova/FileTransfer.java
index bc730f6..143a718 100644
--- a/framework/src/org/apache/cordova/FileTransfer.java
+++ b/framework/src/org/apache/cordova/FileTransfer.java
@@ -280,10 +280,10 @@ public class FileTransfer extends Plugin {
         // Handle the other headers
         try {
           JSONObject headers = params.getJSONObject("headers");
-          for (Iterator iter = params.keys(); iter.hasNext();)
+          for (Iterator iter = headers.keys(); iter.hasNext();)
           {
             String headerKey = iter.next().toString();
-            conn.setRequestProperty(headerKey, params.getString(headerKey));
+            conn.setRequestProperty(headerKey, headers.getString(headerKey));
           }
         } catch (JSONException e1) {
           // No headers to be manipulated!


Mime
View raw message