Skip to content

Commit

Permalink
Remove redundant add ops in router
Browse files Browse the repository at this point in the history
closes #1058
  • Loading branch information
smart--petea authored and dougwilson committed Oct 16, 2014
1 parent e904e66 commit 57cfe4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/proto.js
Expand Up @@ -101,8 +101,8 @@ app.use = function(route, fn){

app.handle = function(req, res, out) {
var stack = this.stack
, search = 1 + req.url.indexOf('?')
, pathlength = search ? search - 1 : req.url.length
, searchIndex = req.url.indexOf('?')
, pathlength = searchIndex !== -1 ? searchIndex : req.url.length
, fqdn = 1 + req.url.substr(0, pathlength).indexOf('://')
, protohost = fqdn ? req.url.substr(0, req.url.indexOf('/', 2 + fqdn)) : ''
, removed = ''
Expand Down

0 comments on commit 57cfe4f

Please sign in to comment.