Use headers instead of whole response

main
Kevin 8 years ago
parent d15a7688ad
commit 289f1547ab

@ -29,7 +29,7 @@ exports.detectFromHTML = function(options, data, cb) {
/**
* Do a actual request for the body & headers, then
* run through detection
**/
**/
exports.detectFromUrl = function(options, cb) {
// ensure options and url were
@ -59,7 +59,7 @@ exports.detectFromUrl = function(options, cb) {
exports.detect(options, data, cb);
}
});
}
@ -71,7 +71,7 @@ function getHTMLFromUrl(url, cb) {
var data = {
html: body,
url: url,
headers: response
headers: response.headers
};
cb(null, data);
} else {