Comparing version 0.6.1 to 0.6.2
@@ -330,3 +330,3 @@ 'use strict'; | ||
} else if (!request) { | ||
callback(new Error('Not connected')); | ||
return callback(new Error('Not connected')); | ||
} | ||
@@ -333,0 +333,0 @@ request.write(chunk, encoding); |
@@ -61,1 +61,22 @@ 'use strict'; | ||
}; | ||
JSONPlugin.prototype.parseHeader = function(header, context) { | ||
var data = { | ||
values: [] | ||
}; | ||
var index, media; | ||
if ((index = header.indexOf(';')) > -1) { | ||
context.headers.contentType = header.substring(0, index); | ||
media = header.substring(index + 1).trim().split('='); | ||
if (media[0] === 'charset') { | ||
context.headers.charset = media[1]; | ||
} | ||
} else { | ||
context.headers.contentType = header; | ||
} | ||
}; |
{ | ||
"name": "rail", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "An enhanced HTTP/RESTful API Client", | ||
@@ -49,4 +49,4 @@ "keywords": [ | ||
"node": ">= 0.10.38 < 2.0.0", | ||
"npm": "~2.8.4" | ||
"npm": "~2.9.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
134112
53
2962