Permalink
Browse files

Fix for IE7 - can't load stats page

  • Loading branch information...
1 parent 6abe294 commit c523e9a32c7cbb09f5d86b43e93829e0bd938aba @dhruvbird committed Sep 9, 2012
Showing with 6 additions and 6 deletions.
  1. +1 −5 src/bosh.js
  2. +5 −1 src/http-server.js
View
6 src/bosh.js
@@ -93,11 +93,7 @@ exports.createServer = function (options) {
function get_statistics() {
var stats = [ ];
- stats.push('<!DOCTYPE html>');
- var content = new ltx.Element('html', {
- 'xmlns': 'http://www.w3.org/1999/xhtml',
- 'xml:lang': 'en'
- })
+ var content = new ltx.Element('html')
.c('head')
.c('title').t('node-xmpp-bosh').up()
.up()
View
6 src/http-server.js
@@ -203,7 +203,11 @@ function HTTPServer(port, host, stat_func, bosh_request_handler, http_error_hand
function handle_get_statistics(req, res, u) {
var ppos = u.pathname.search(bosh_options.path);
if (req.method === 'GET' && ppos !== -1 && !u.query.hasOwnProperty('data')) {
- res.writeHead(200, bosh_options.HTTP_GET_RESPONSE_HEADERS);
+ var _headers = { };
+ dutil.copy(_headers, bosh_options.HTTP_GET_RESPONSE_HEADERS);
+ _headers['Content-Type'] = 'text/html; charset=utf-8';
+ res.writeHead(200, _headers);
+
var stats = stat_func();
res.end(stats);
return false;

0 comments on commit c523e9a

Please sign in to comment.