Permalink
Browse files

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...
dhruvbird committed Aug 28, 2012
1 parent d0c1186 commit 1b8708dededdc2cb566a7f12356ec2d2f1093f37
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/http-server.js
View
@@ -89,12 +89,13 @@ function HTTPServer(port, host, stat_func, bosh_request_handler, http_error_hand
res = new helper.JSONPResponseProxy(req, res);
res.request_headers = req.headers;
- if (parse_request([ u.query.data ]) === null) {
+ var body = parse_request([u.query.data]);
+ if (body === null) {
// FIXME: If we got an invalid JSON, we should respond
// with an error condition.
res.end("XML Parsing Error!");
} else {
- bosh_request_handler(res, bosh_request_parser.parsedBody);
+ bosh_request_handler(res, body);
}
return false;
}

0 comments on commit 1b8708d

Please sign in to comment.