Merge pull request #1237 from kevNii/master

Use headers instead of whole response (npm driver)
main
Elbert Alias 8 years ago committed by GitHub
commit e6bc651903

@ -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 {

Loading…
Cancel
Save