Comparing version 4.10.6 to 4.10.7
@@ -910,2 +910,3 @@ /** | ||
var done = false; | ||
var streaming = false; | ||
@@ -924,2 +925,3 @@ // directory | ||
function onerror(err) { | ||
if (!err) return; | ||
if (done) return; | ||
@@ -937,2 +939,7 @@ done = true; | ||
// file | ||
function onfile() { | ||
onFinished(res, onfinish); | ||
} | ||
// finished | ||
@@ -947,2 +954,7 @@ function onfinish(err) { | ||
if (!streaming) { | ||
callback(); | ||
return; | ||
} | ||
// response finished before end of file | ||
@@ -955,6 +967,13 @@ var err = new Error('Request aborted'); | ||
// streaming | ||
function onstream() { | ||
streaming = true; | ||
} | ||
file.on('directory', ondirectory); | ||
file.on('end', onend); | ||
file.on('error', onerror); | ||
file.on('directory', ondirectory); | ||
onFinished(res, onfinish); | ||
file.on('file', onfile); | ||
file.on('stream', onstream); | ||
onFinished(res, onerror); | ||
@@ -961,0 +980,0 @@ if (options.headers) { |
@@ -210,3 +210,3 @@ | ||
if (!has_method && method === 'OPTIONS') { | ||
options.push.apply(options, route._options()); | ||
appendMethods(options, route._options()); | ||
} | ||
@@ -496,2 +496,12 @@ | ||
// append methods to a list of methods | ||
function appendMethods(list, addition) { | ||
for (var i = 0; i < addition.length; i++) { | ||
var method = addition[i]; | ||
if (list.indexOf(method) === -1) { | ||
list.push(method); | ||
} | ||
} | ||
} | ||
// get type for error message | ||
@@ -498,0 +508,0 @@ function gettype(obj) { |
{ | ||
"name": "express", | ||
"description": "Fast, unopinionated, minimalist web framework", | ||
"version": "4.10.6", | ||
"version": "4.10.7", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -33,11 +33,11 @@ "contributors": [ | ||
"cookie-signature": "1.0.5", | ||
"debug": "~2.1.0", | ||
"debug": "~2.1.1", | ||
"depd": "~1.0.0", | ||
"escape-html": "1.0.1", | ||
"etag": "~1.5.1", | ||
"finalhandler": "0.3.2", | ||
"finalhandler": "0.3.3", | ||
"fresh": "0.2.4", | ||
"media-typer": "0.3.0", | ||
"methods": "1.1.0", | ||
"on-finished": "~2.1.1", | ||
"methods": "1.1.1", | ||
"on-finished": "~2.2.0", | ||
"parseurl": "~1.3.0", | ||
@@ -49,4 +49,4 @@ "path-to-regexp": "0.1.3", | ||
"send": "0.10.1", | ||
"serve-static": "~1.7.1", | ||
"type-is": "~1.5.4", | ||
"serve-static": "~1.7.2", | ||
"type-is": "~1.5.5", | ||
"vary": "~1.0.0", | ||
@@ -53,0 +53,0 @@ "cookie": "0.1.2", |
@@ -21,3 +21,3 @@ [![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/) | ||
### Installation | ||
## Installation | ||
@@ -90,3 +90,3 @@ ```bash | ||
To view the examples, clone the Express repo & install the dependancies: | ||
To view the examples, clone the Express repo and install the dependancies: | ||
@@ -114,3 +114,3 @@ ```bash | ||
### People | ||
## People | ||
@@ -123,3 +123,3 @@ The original author of Express is [TJ Holowaychuk](https://github.com/tj) [![TJ's Gratipay][gratipay-image-visionmedia]][gratipay-url-visionmedia] | ||
### License | ||
## License | ||
@@ -126,0 +126,0 @@ [MIT](LICENSE) |
Sorry, the diff of this file is too big to display
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
165071
2976
+ Addedfinalhandler@0.3.3(transitive)
+ Addedmethods@1.1.1(transitive)
+ Addedon-finished@2.2.1(transitive)
- Removedfinalhandler@0.3.2(transitive)
- Removedmethods@1.1.0(transitive)
Updateddebug@~2.1.1
Updatedfinalhandler@0.3.3
Updatedmethods@1.1.1
Updatedon-finished@~2.2.0
Updatedserve-static@~1.7.2
Updatedtype-is@~1.5.5