Skip to content

Commit

Permalink
Merge pull request #1615 from ChALkeR/master
Browse files Browse the repository at this point in the history
Replace '.client' with '.socket' as the former was deprecated in 2.2.0.
  • Loading branch information
simov committed May 31, 2015
2 parents 3512cdd + 37372c4 commit ab7062b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions request.js
Expand Up @@ -1040,10 +1040,10 @@ Request.prototype.onRequestResponse = function (response) {

// XXX This is different on 0.10, because SSL is strict by default
if (self.httpModule === https &&
self.strictSSL && (!response.hasOwnProperty('client') ||
!response.client.authorized)) {
self.strictSSL && (!response.hasOwnProperty('socket') ||
!response.socket.authorized)) {
debug('strict ssl error', self.uri.href)
var sslErr = response.hasOwnProperty('client') ? response.client.authorizationError : self.uri.href + ' does not support SSL'
var sslErr = response.hasOwnProperty('socket') ? response.socket.authorizationError : self.uri.href + ' does not support SSL'
self.emit('error', new Error('SSL Error: ' + sslErr))
return
}
Expand Down
4 changes: 2 additions & 2 deletions tests/ssl/ca/localhost.js
Expand Up @@ -21,9 +21,9 @@ https.request({ host: 'localhost'
, agent: agent
, ca: [ ca ]
, path: '/' }, function (res) {
if (res.client.authorized) {
if (res.socket.authorized) {
console.log('node test: OK')
} else {
throw new Error(res.client.authorizationError)
throw new Error(res.socket.authorizationError)
}
}).end()
4 changes: 2 additions & 2 deletions tests/ssl/ca/server.js
Expand Up @@ -22,9 +22,9 @@ https.request({ host: 'localhost'
, agent: agent
, ca: [ ca ]
, path: '/' }, function (res) {
if (res.client.authorized) {
if (res.socket.authorized) {
console.log('node test: OK')
} else {
throw new Error(res.client.authorizationError)
throw new Error(res.socket.authorizationError)
}
}).end()

0 comments on commit ab7062b

Please sign in to comment.