Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace '.client' with '.socket' as the former was deprecated in 2.2.0. #1615

Merged
merged 1 commit into from May 31, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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()