Skip to content

Commit

Permalink
Use res.statusCode instead of parsing internal property
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceK33z committed Sep 19, 2016
1 parent 294fd4e commit ffe222c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/webjs.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ exports.GenericApp = class GenericApp
log_request: (req, res, data) ->
td = (new Date()) - req.start_date
@log('info', req.method + ' ' + req.url + ' ' + td + 'ms ' +
(if res.finished and res._header then res._header.split('\r')[0].split(' ')[1] \
else '(unfinished)'))
(if res.finished then res.statusCode else '(unfinished)'))
return data

log: (severity, line) ->
Expand Down

0 comments on commit ffe222c

Please sign in to comment.