Permalink
Browse files

abbreviated test now passes

  • Loading branch information...
1 parent 5d904b0 commit 27a2ab3cfda0842811a810eaaace107c3a0d1121 @substack substack committed Jan 15, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −1 index.js
  2. +3 −2 lib/parse_args.js
View
@@ -92,7 +92,7 @@ function makeBounce (bs, client, req) {
bs.pipe(stream);
stream.pipe(client);
}
- else {
+ else if (opts.emitter) {
opts.emitter.emit('drop', client);
}
View
@@ -17,8 +17,9 @@ module.exports = function (args) {
else if (/^\.?\//.test(arg)) {
opts.unix = arg;
}
- else if ((m = arg.match(/^(?:http:\/\/)?([^:\/]+)?(:\d+)?(\/.+)?$/))
- && (m[1] || m[2] || m[3])) {
+ else if ((m = arg.match(
+ /^(?:http:\/\/)?([^:\/]+)?(?::(\d+))?(\/.+)?$/
+ )) && (m[1] || m[2] || m[3])) {
opts.host = m[1] || 'localhost';
opts.port = m[2] || 80;
if (m[3]) opts.path = m[3];

0 comments on commit 27a2ab3

Please sign in to comment.