Skip to content

Commit

Permalink
Merge pull request #972 from rlidwka/nl
Browse files Browse the repository at this point in the history
ending default 404 handler with a newline
  • Loading branch information
jonathanong committed Dec 6, 2013
2 parents 69c667d + f1a0b4e commit a181efd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/proto.js
Expand Up @@ -155,7 +155,7 @@ app.handle = function(req, res, out) {
res.statusCode = 404;
res.setHeader('Content-Type', 'text/html');
if ('HEAD' == req.method) return res.end();
res.end('Cannot ' + utils.escape(req.method) + ' ' + utils.escape(req.originalUrl));
res.end('Cannot ' + utils.escape(req.method) + ' ' + utils.escape(req.originalUrl) + '\n');
}
return;
}
Expand Down
2 changes: 1 addition & 1 deletion test/server.js
Expand Up @@ -87,6 +87,6 @@ describe('app', function(){
var app = connect();
app.request()
.get('/foo/<script>stuff</script>')
.expect('Cannot GET /foo/&lt;script&gt;stuff&lt;/script&gt;', done);
.expect('Cannot GET /foo/&lt;script&gt;stuff&lt;/script&gt;\n', done);
})
})

0 comments on commit a181efd

Please sign in to comment.