ripple-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brentlint...@apache.org
Subject git commit: Fix RIPPLE-60 - proxy not detecting json properly
Date Thu, 26 Jun 2014 13:42:37 GMT
Repository: incubator-ripple
Updated Branches:
  refs/heads/master 2e208dc72 -> b008bcec9


Fix RIPPLE-60 - proxy not detecting json properly

It didn't support stuff like
`Content-Type: application/json;charset=UTF-8` before. Now it does.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/b008bcec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/b008bcec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/b008bcec

Branch: refs/heads/master
Commit: b008bcec93e5b036d82e927cc03bc9170b6adad3
Parents: 2e208dc
Author: Farid Neshat <FaridN_SOAD@yahoo.com>
Authored: Tue May 13 21:12:38 2014 +0800
Committer: Farid Neshat <FaridN_SOAD@yahoo.com>
Committed: Tue May 13 21:12:41 2014 +0800

----------------------------------------------------------------------
 lib/server/proxy.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/b008bcec/lib/server/proxy.js
----------------------------------------------------------------------
diff --git a/lib/server/proxy.js b/lib/server/proxy.js
index 70ce9d8..c5557c5 100644
--- a/lib/server/proxy.js
+++ b/lib/server/proxy.js
@@ -83,7 +83,7 @@ function proxy(req, res, callback) {
         };
 
         if (Object.keys(req.body).length > 0) {
-            if (req.get("content-type") === "application/json") {
+            if (req.is("json")) {
                 proxyReqData.body = JSON.stringify(req.body);
             } else {
                 proxyReqData.form = req.body;


Mime
View raw message