Skip to content

Commit

Permalink
Merge pull request #213 from SpaceK33z/header-check
Browse files Browse the repository at this point in the history
Don't assume `res._header` exists
  • Loading branch information
brycekahle authored Sep 19, 2016
2 parents 959d567 + ffe222c commit ac7dd95
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 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 ac7dd95

Please sign in to comment.