Permalink
Browse files

Merge pull request #6 from naholyr/patch-1

When piping to a response, and an error occurs, end the response
  • Loading branch information...
2 parents 84ffd3a + a44288d commit 5bad4646f84846826e10798a659b180b45756072 @mikeal mikeal committed Oct 30, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 main.js
View
@@ -72,10 +72,10 @@ function File (options) {
) {
if (err.code === 'ENOENT') {
self.dest.statusCode = 404
- self.end('Not Found')
+ self.dest.end('Not Found')
} else {
self.dest.statusCode = 500
- self.end(err.message)
+ self.dest.end(err.message)
}
return
}

0 comments on commit 5bad464

Please sign in to comment.