Comparing version 2.4.6 to 2.4.7
2.4.7 / 2011-10-05 | ||
================== | ||
* Added mkdirp to express(1). Closes #795 | ||
* Added simple _json-config_ example | ||
* Added shorthand for the parsed request's pathname via `req.path` | ||
* Changed connect dep to 1.7.x to fix npm issue... | ||
* Fixed `res.redirect()` __HEAD__ support. [reported by xerox] | ||
* Fixed `req.flash()`, only escape args | ||
* Fixed absolute path checking on windows. Closes #829 [reported by andrewpmckenzie] | ||
2.4.6 / 2011-08-22 | ||
@@ -12,3 +23,4 @@ ================== | ||
* Added `app.routes.all()`. Closes #803 | ||
* Added "basepath" setting to work in conjunction with reverse proxies etc. * Refactored `Route` to use a single array of callbacks | ||
* Added "basepath" setting to work in conjunction with reverse proxies etc. | ||
* Refactored `Route` to use a single array of callbacks | ||
* Added support for multiple callbacks for `app.param()`. Closes #801 | ||
@@ -15,0 +27,0 @@ Closes #805 |
@@ -31,3 +31,3 @@ | ||
exports.version = '2.4.6'; | ||
exports.version = '2.4.7'; | ||
@@ -34,0 +34,0 @@ /** |
@@ -15,2 +15,3 @@ | ||
, utils = require('./utils') | ||
, parse = require('url').parse | ||
, mime = require('mime'); | ||
@@ -92,2 +93,13 @@ | ||
/** | ||
* Short-hand for `require('url').parse(req.url).pathname`. | ||
* | ||
* @return {String} | ||
* @api public | ||
*/ | ||
req.__defineGetter__('path', function(){ | ||
return parse(this.url).pathname; | ||
}); | ||
/** | ||
* Check if the _Accept_ header is present, and includes the given `type`. | ||
@@ -222,6 +234,6 @@ * | ||
formatters.__proto__ = flashFormatters; | ||
msg = utils.miniMarkdown(utils.escape(msg)); | ||
msg = utils.miniMarkdown(msg); | ||
msg = msg.replace(/%([a-zA-Z])/g, function(_, format){ | ||
var formatter = formatters[format]; | ||
if (formatter) return formatter(args[i++]); | ||
if (formatter) return formatter(utils.escape(args[i++])); | ||
}); | ||
@@ -228,0 +240,0 @@ return (msgs[type] = msgs[type] || []).push(msg); |
@@ -108,3 +108,3 @@ | ||
this.statusCode = status; | ||
this.end('HEAD' == this.req.method ? undefined : body); | ||
this.end('HEAD' == this.req.method ? null : body); | ||
return this; | ||
@@ -380,2 +380,3 @@ }; | ||
, status = status || 302 | ||
, head = 'HEAD' == req.method | ||
, body; | ||
@@ -423,3 +424,3 @@ | ||
this.header('Location', url); | ||
this.end(body); | ||
this.end(head ? null : body); | ||
}; | ||
@@ -426,0 +427,0 @@ |
@@ -9,2 +9,15 @@ | ||
/** | ||
* Check if `path` looks absolute. | ||
* | ||
* @param {String} path | ||
* @return {Boolean} | ||
* @api private | ||
*/ | ||
exports.isAbsolute = function(path){ | ||
if ('/' == path[0]) return true; | ||
if (':' == path[1] && '\\' == path[2]) return true; | ||
}; | ||
/** | ||
* Merge object `b` with `a` giving precedence to | ||
@@ -11,0 +24,0 @@ * values in object `a`. |
@@ -13,2 +13,3 @@ | ||
var path = require('path') | ||
, utils = require('../utils') | ||
, extname = path.extname | ||
@@ -103,3 +104,3 @@ , dirname = path.dirname | ||
// Absolute | ||
if ('/' == path[0]) return path; | ||
if (utils.isAbsolute(path)) return path; | ||
// Relative to parent | ||
@@ -106,0 +107,0 @@ if (this.relative && this.parent) return this.parent.dirname + '/' + path; |
{ | ||
"name": "express", | ||
"description": "Sinatra inspired web development framework", | ||
"version": "2.4.6", | ||
"version": "2.4.7", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -13,5 +13,6 @@ "contributors": [ | ||
"dependencies": { | ||
"connect": ">= 1.5.2 < 2.0.0", | ||
"connect": "1.7.x", | ||
"mime": ">= 0.0.1", | ||
"qs": ">= 0.3.1" | ||
"qs": ">= 0.3.1", | ||
"mkdirp": "0.0.7" | ||
}, | ||
@@ -18,0 +19,0 @@ "devDependencies": { |
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
110870
23
2562
4
+ Addedmkdirp@0.0.7
+ Addedconnect@1.7.3(transitive)
+ Addedmkdirp@0.0.7(transitive)
- Removedconnect@1.9.2(transitive)
- Removedformidable@1.0.17(transitive)
Updatedconnect@1.7.x