get-pixels
Advanced tools
Comparing version 3.2.0 to 3.2.1
@@ -152,3 +152,3 @@ 'use strict' | ||
} else if(url.indexOf('http://') === 0 || url.indexOf('https://') === 0) { | ||
request(url, function(err, response, body) { | ||
request({url:url, encoding:null}, function(err, response, body) { | ||
if(err) { | ||
@@ -158,3 +158,11 @@ cb(err) | ||
} | ||
type = type || response.getHeader('content-type') | ||
type = type; | ||
if(!type){ | ||
if(response.getHeader !== undefined){ | ||
type = response.getHeader('content-type'); | ||
}else if(response.headers !== undefined){ | ||
type = response.headers['content-type']; | ||
} | ||
} | ||
if(!type) { | ||
@@ -161,0 +169,0 @@ cb(new Error('Invalid content-type')) |
{ | ||
"name": "get-pixels", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "Reads the pixels of an image as an ndarray", | ||
@@ -5,0 +5,0 @@ "main": "node-pixels.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11248
297