Skip to content

Commit

Permalink
fix: escape req.method in 404 response
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jun 27, 2013
1 parent 7978abc commit 277e5aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ app.handle = function(req, res, out) {
res.statusCode = 404;
res.setHeader('Content-Type', 'text/plain');
if ('HEAD' == req.method) return res.end();
res.end('Cannot ' + req.method + ' ' + utils.escape(req.originalUrl));
res.end('Cannot ' + utils.escape(req.method) + ' ' + utils.escape(req.originalUrl));
}
return;
}
Expand Down Expand Up @@ -202,7 +202,7 @@ app.handle = function(req, res, out) {
* Listen for connections.
*
* This method takes the same arguments
* as node's `http.Server#listen()`.
* as node's `http.Server#listen()`.
*
* HTTP and HTTPS:
*
Expand All @@ -214,9 +214,9 @@ app.handle = function(req, res, out) {
* var connect = require('connect')
* , http = require('http')
* , https = require('https');
*
*
* var app = connect();
*
*
* http.createServer(app).listen(80);
* https.createServer(options, app).listen(443);
*
Expand Down

0 comments on commit 277e5aa

Please sign in to comment.