Skip to content

Commit

Permalink
Merge pull request #7 from SoapyIllusions/patch-1
Browse files Browse the repository at this point in the history
res.socket is not always defined
  • Loading branch information
jed committed Mar 16, 2012
2 parents 73d1481 + e54b10e commit 739d476
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Cookies.prototype = {
var res = this.response
, req = this.request
, headers = res.getHeader( "Set-Cookie" ) || []
, secure = res.socket.encrypted || req.connection.proxySecure
, secure = res.socket ? res.socket.encrypted || req.connection.proxySecure : req.connection.proxySecure
, cookie = new Cookie( name, value, opts )
, header

Expand Down

0 comments on commit 739d476

Please sign in to comment.