mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
Merge pull request #270 from node-migrator-bot/clean
Hi! I fixed some calls to "sys" for you!
This commit is contained in:
commit
fd16aeb4f8
12
vendor/websocket.js
vendored
12
vendor/websocket.js
vendored
@ -38,7 +38,7 @@ var http = require('http');
|
|||||||
var https = require('https');
|
var https = require('https');
|
||||||
var net = require('net');
|
var net = require('net');
|
||||||
var urllib = require('url');
|
var urllib = require('url');
|
||||||
var sys = require('sys');
|
var util = require('util');
|
||||||
|
|
||||||
var FRAME_NO = 0;
|
var FRAME_NO = 0;
|
||||||
var FRAME_LO = 1;
|
var FRAME_LO = 1;
|
||||||
@ -52,7 +52,7 @@ var CLOSED = 3;
|
|||||||
|
|
||||||
var debugLevel = parseInt(process.env.NODE_DEBUG, 16);
|
var debugLevel = parseInt(process.env.NODE_DEBUG, 16);
|
||||||
var debug = (debugLevel & 0x4) ?
|
var debug = (debugLevel & 0x4) ?
|
||||||
function() { sys.error.apply(this, arguments); } :
|
function() { util.error.apply(this, arguments); } :
|
||||||
function() { };
|
function() { };
|
||||||
|
|
||||||
// Generate a Sec-WebSocket-* value
|
// Generate a Sec-WebSocket-* value
|
||||||
@ -246,7 +246,7 @@ var WebSocket = function(url, proto, opts) {
|
|||||||
|
|
||||||
// FRAME_LO
|
// FRAME_LO
|
||||||
function(buf, off) {
|
function(buf, off) {
|
||||||
debug('frame_lo(' + sys.inspect(buf) + ', ' + off + ')');
|
debug('frame_lo(' + util.inspect(buf) + ', ' + off + ')');
|
||||||
|
|
||||||
// Find the first instance of 0xff, our terminating byte
|
// Find the first instance of 0xff, our terminating byte
|
||||||
for (var i = off; i < buf.length && buf[i] != 0xff; i++)
|
for (var i = off; i < buf.length && buf[i] != 0xff; i++)
|
||||||
@ -306,7 +306,7 @@ var WebSocket = function(url, proto, opts) {
|
|||||||
|
|
||||||
// FRAME_HI
|
// FRAME_HI
|
||||||
function(buf, off) {
|
function(buf, off) {
|
||||||
debug('frame_hi(' + sys.inspect(buf) + ', ' + off + ')');
|
debug('frame_hi(' + util.inspect(buf) + ', ' + off + ')');
|
||||||
|
|
||||||
if (buf[off] !== 0) {
|
if (buf[off] !== 0) {
|
||||||
throw new Error('High-byte framing not supported.');
|
throw new Error('High-byte framing not supported.');
|
||||||
@ -323,7 +323,7 @@ var WebSocket = function(url, proto, opts) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
debug('dataListener(' + sys.inspect(buf) + ')');
|
debug('dataListener(' + util.inspect(buf) + ')');
|
||||||
|
|
||||||
var off = 0;
|
var off = 0;
|
||||||
var consumed = 0;
|
var consumed = 0;
|
||||||
@ -624,7 +624,7 @@ var WebSocket = function(url, proto, opts) {
|
|||||||
httpReq.end();
|
httpReq.end();
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
sys.inherits(WebSocket, events.EventEmitter);
|
util.inherits(WebSocket, events.EventEmitter);
|
||||||
exports.WebSocket = WebSocket;
|
exports.WebSocket = WebSocket;
|
||||||
|
|
||||||
// Add some constants to the WebSocket object
|
// Add some constants to the WebSocket object
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user