Permalink
Browse files

fixed updating /paths, url tests now pass again

  • Loading branch information...
1 parent eeec19a commit a5440e7f4929071e1c5ca05d0d271584f5109db4 @substack committed Mar 21, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −1 lib/insert.js
  2. +0 −1 test/url.js
View
5 lib/insert.js
@@ -30,6 +30,9 @@ module.exports = function (opts) {
return key + ': ' + opts.headers[key];
}).join(line + '\n') + line + '\n' + line + '\n');
}
+ else {
+ this.queue(line + '\n');
+ }
line = undefined;
return this.queue(buf.slice(i + 1));
}
@@ -57,7 +60,7 @@ module.exports = function (opts) {
var key = m[1];
var lowerKey = key.toLowerCase();
- if (headersLower && !headersLower[lowerKey]) {
+ if (!headersLower || !headersLower[lowerKey]) {
this.queue(line + '\n');
}
}
View
1 test/url.js
@@ -19,7 +19,6 @@ test('update url', function (t) {
var data = '';
s.on('data', function (buf) { data += buf });
s.on('end', function () {
-console.dir(data);
t.equal(
data,
msg.toString().replace('/beepity', '/boop')

0 comments on commit a5440e7

Please sign in to comment.