Comparing version 0.6.2 to 0.6.3
@@ -54,4 +54,16 @@ var path = require('path') | ||
if (headers !== undefined) { | ||
this.headers = {}; | ||
// makes sure all keys in headers are in lower case | ||
var key2; | ||
for (key2 in headers) { | ||
if (headers.hasOwnProperty(key2)) { | ||
this.headers[key2.toLowerCase()] = headers[key2]; | ||
} | ||
} | ||
} | ||
this.body = body; | ||
this.headers = headers; | ||
add(key, this); | ||
@@ -58,0 +70,0 @@ return scope; |
{ "name" : "nock" | ||
, "description" : "HTTP Server mocking for Node.js" | ||
, "tags" : ["Mock", "HTTP", "testing", "isolation"] | ||
, "version" : "0.6.2" | ||
, "version" : "0.6.3" | ||
, "author" : "Pedro Teixeira <pedro.teixeira@gmail.com>" | ||
@@ -6,0 +6,0 @@ , "contributors" : |
@@ -161,3 +161,3 @@ var nock = require('../.') | ||
res.on('end', function() { | ||
t.similar(res.headers, {'X-My-Headers': 'My Header value'}); | ||
t.equivalent(res.headers, {'x-my-headers': 'My Header value'}); | ||
t.end(); | ||
@@ -164,0 +164,0 @@ }); |
42791
1234