Skip to content
This repository
Browse code

Fetch parsed body node from parse_request() instead of bosh_request_p…

…arser.parsedBody, which contains a handle to a dummy node
  • Loading branch information...
commit 1b8708dededdc2cb566a7f12356ec2d2f1093f37 1 parent d0c1186
Dhruv Matani authored August 28, 2012

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  src/http-server.js
5  src/http-server.js
@@ -89,12 +89,13 @@ function HTTPServer(port, host, stat_func, bosh_request_handler, http_error_hand
89 89
             res = new helper.JSONPResponseProxy(req, res);
90 90
             res.request_headers = req.headers;
91 91
 
92  
-            if (parse_request([ u.query.data ]) === null) {
  92
+            var body = parse_request([u.query.data]);
  93
+            if (body === null) {
93 94
                 // FIXME: If we got an invalid JSON, we should respond
94 95
                 // with an error condition.
95 96
                 res.end("XML Parsing Error!");
96 97
             } else {
97  
-                bosh_request_handler(res, bosh_request_parser.parsedBody);
  98
+                bosh_request_handler(res, body);
98 99
             }
99 100
             return false;
100 101
         }

0 notes on commit 1b8708d

Please sign in to comment.
Something went wrong with that request. Please try again.