Skip to content
This repository
Browse code

fixed updating /paths, url tests now pass again

  • Loading branch information...
commit a5440e7f4929071e1c5ca05d0d271584f5109db4 1 parent eeec19a
James Halliday authored

Showing 2 changed files with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. +4 1 lib/insert.js
  2. +0 1  test/url.js
5 lib/insert.js
@@ -30,6 +30,9 @@ module.exports = function (opts) {
30 30 return key + ': ' + opts.headers[key];
31 31 }).join(line + '\n') + line + '\n' + line + '\n');
32 32 }
  33 + else {
  34 + this.queue(line + '\n');
  35 + }
33 36 line = undefined;
34 37 return this.queue(buf.slice(i + 1));
35 38 }
@@ -57,7 +60,7 @@ module.exports = function (opts) {
57 60 var key = m[1];
58 61 var lowerKey = key.toLowerCase();
59 62
60   - if (headersLower && !headersLower[lowerKey]) {
  63 + if (!headersLower || !headersLower[lowerKey]) {
61 64 this.queue(line + '\n');
62 65 }
63 66 }
1  test/url.js
@@ -19,7 +19,6 @@ test('update url', function (t) {
19 19 var data = '';
20 20 s.on('data', function (buf) { data += buf });
21 21 s.on('end', function () {
22   -console.dir(data);
23 22 t.equal(
24 23 data,
25 24 msg.toString().replace('/beepity', '/boop')

0 comments on commit a5440e7

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