Permalink
Browse files

changed sys to util, fixed the auth user for include @ ,like email(hack)

  • Loading branch information...
1 parent 7b4e85c commit 1573cfbcb3d2f430d9e9c590fef8edf288292eef @eggcaker committed Nov 22, 2011
Showing with 3 additions and 5 deletions.
  1. +2 −4 bin/http-console
  2. +1 −1 lib/http-console.js
View
@@ -3,9 +3,8 @@
var path = require('path'),
sys = require('util');
-require.paths.unshift(path.join(__dirname, '..', 'lib'));
-var httpConsole = require('http-console');
+var httpConsole = require(path.join(__dirname, '../lib/http-console'));
var help = [
'usage: http-console [username:password@host:port] [options]',
@@ -79,7 +78,7 @@ var hostPort = url.pop().split(':'),
if (auth) {
auth = auth.split(':');
options.auth = {
- username: auth.shift(),
+ username: auth.shift().replace('%40', '@'),
password: auth.shift()
};
}
@@ -90,4 +89,3 @@ var host = hostPort.shift(),
var console = new(httpConsole.Console)(host, port, options);
console.initialize();
-
View
@@ -5,7 +5,7 @@ var http = require('http'),
events = require('events'),
queryString = require('querystring'),
readline = require('readline'),
- sys = require('sys');
+ sys = require('util');
require('./ext');

0 comments on commit 1573cfb

Please sign in to comment.