Comparing version 2.5.2 to 2.5.3
2.5.3 / 2011-12-30 | ||
================== | ||
* Fixed `req.is()` when a charset is present | ||
2.5.2 / 2011-12-10 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -31,3 +31,3 @@ | ||
exports.version = '2.5.2'; | ||
exports.version = '2.5.3'; | ||
@@ -34,0 +34,0 @@ /** |
@@ -295,12 +295,14 @@ | ||
if (fn) return fn(this); | ||
var contentType = this.headers['content-type']; | ||
if (!contentType) return; | ||
var ct = this.headers['content-type']; | ||
if (!ct) return false; | ||
ct = ct.split(';')[0]; | ||
if (!~type.indexOf('/')) type = mime.lookup(type); | ||
if (~type.indexOf('*')) { | ||
type = type.split('/') | ||
contentType = contentType.split('/'); | ||
if ('*' == type[0] && type[1] == contentType[1]) return true; | ||
if ('*' == type[1] && type[0] == contentType[0]) return true; | ||
type = type.split('/'); | ||
ct = ct.split('/'); | ||
if ('*' == type[0] && type[1] == ct[1]) return true; | ||
if ('*' == type[1] && type[0] == ct[0]) return true; | ||
return false; | ||
} | ||
return !! ~contentType.indexOf(type); | ||
return !! ~ct.indexOf(type); | ||
}; | ||
@@ -307,0 +309,0 @@ |
{ | ||
"name": "express", | ||
"description": "Sinatra inspired web development framework", | ||
"version": "2.5.2", | ||
"version": "2.5.3", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -13,3 +13,3 @@ "contributors": [ | ||
"dependencies": { | ||
"connect": "1.8.x", | ||
"connect": "1.x", | ||
"mime": ">= 0.0.1", | ||
@@ -16,0 +16,0 @@ "qs": ">= 0.3.1", |
Sorry, the diff of this file is not supported yet
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
4
110999
21
2553
+ Addedconnect@1.9.2(transitive)
- Removedconnect@1.8.7(transitive)
Updatedconnect@1.x