You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by da...@apache.org on 2016/05/12 14:19:52 UTC

cordova-labs git commit: CB-10974 Cordova file transfer Content-Length header problem

Repository: cordova-labs
Updated Branches:
  refs/heads/cordova-filetransfer 5012c5915 -> b10c5dbe7


CB-10974 Cordova file transfer Content-Length header problem

Adds headers echo endpoint


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/b10c5dbe
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/b10c5dbe
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/b10c5dbe

Branch: refs/heads/cordova-filetransfer
Commit: b10c5dbe731a30eb4f5af93631684eccd18c45f4
Parents: 5012c59
Author: daserge <v-...@microsoft.com>
Authored: Thu Apr 14 10:33:44 2016 +0300
Committer: daserge <v-...@microsoft.com>
Committed: Thu May 12 17:18:46 2016 +0300

----------------------------------------------------------------------
 server.js | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/b10c5dbe/server.js
----------------------------------------------------------------------
diff --git a/server.js b/server.js
index ba12998..edf0428 100644
--- a/server.js
+++ b/server.js
@@ -134,6 +134,10 @@ http.createServer(function (req, res) {
         }
     } else if (req.url == '/upload_non_utf' && req.method.toLowerCase() == 'post') {
         parseMultipartForm(req, res, respondWithParsedFormNonUTF);
+    } else if (req.url == '/upload_echo_headers' && req.method.toLowerCase() == 'post') {
+        res.writeHead(200, {'Content-Type': 'application/json'});
+        res.write(stringify(req.headers));
+        res.end("\n");
     } else if (req.url.match(/\d{3}/)) {
         var matches = req.url.match(/\d{3}/);
         status = matches[0];


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org