Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Multipart fix for Node 0.1.98

  • Loading branch information...
commit d79de5aa56eb2fa89850c71c8d966e8f54b89591 1 parent 06769c4
Guillermo Rauch guille authored

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

  1. +3 3 lib/socket.io/transports/xhr-multipart.js
6 lib/socket.io/transports/xhr-multipart.js
... ... @@ -1,5 +1,5 @@
1 1 var Client = require('../client').Client,
2   - qs = require('querystring');
  2 + qs = require('querystring');
3 3
4 4 exports['xhr-multipart'] = Client.extend({
5 5
@@ -34,7 +34,7 @@ exports['xhr-multipart'] = Client.extend({
34 34 this.response.shouldKeepAlive = true;
35 35 this.response.writeHead(200, headers);
36 36 this.response.write("--socketio\n");
37   - this.response.flush();
  37 + if ('flush' in this.response) this.response.flush();
38 38 this._payload();
39 39 this._heartbeatInterval = setInterval(function(){
40 40 self._write(String.fromCharCode(6));
@@ -63,7 +63,7 @@ exports['xhr-multipart'] = Client.extend({
63 63 this.response.write("Content-Type: text/plain" + (message.length === 1 && message.charCodeAt(0) === 6 ? "; charset=us-ascii" : "") + "\n\n");
64 64 this.response.write(message + "\n");
65 65 this.response.write("--socketio\n");
66   - this.response.flush();
  66 + if ('flush' in this.response) this.response.flush();
67 67 }
68 68
69 69 });

0 comments on commit d79de5a

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