Merge branch 'swift-2' of https://github.com/socketio/socket.io-client-swift into API-improvements
This commit is contained in:
commit
145448c087
@ -388,7 +388,7 @@ public class WebSocket : NSObject, NSStreamDelegate {
|
|||||||
|
|
||||||
///validates the HTTP is a 101 as per the RFC spec
|
///validates the HTTP is a 101 as per the RFC spec
|
||||||
private func validateResponse(buffer: UnsafePointer<UInt8>, bufferLen: Int) -> Bool {
|
private func validateResponse(buffer: UnsafePointer<UInt8>, bufferLen: Int) -> Bool {
|
||||||
let response = CFHTTPMessageCreateEmpty(kCFAllocatorDefault, 0).takeRetainedValue()
|
let response = CFHTTPMessageCreateEmpty(kCFAllocatorDefault, false).takeRetainedValue()
|
||||||
CFHTTPMessageAppendBytes(response, buffer, bufferLen)
|
CFHTTPMessageAppendBytes(response, buffer, bufferLen)
|
||||||
if CFHTTPMessageGetResponseStatusCode(response) != 101 {
|
if CFHTTPMessageGetResponseStatusCode(response) != 101 {
|
||||||
return false
|
return false
|
||||||
@ -854,7 +854,7 @@ public class Security {
|
|||||||
}
|
}
|
||||||
var policy: SecPolicyRef
|
var policy: SecPolicyRef
|
||||||
if self.validatedDN {
|
if self.validatedDN {
|
||||||
policy = SecPolicyCreateSSL(1, domain)
|
policy = SecPolicyCreateSSL(true, domain)
|
||||||
} else {
|
} else {
|
||||||
policy = SecPolicyCreateBasicX509()
|
policy = SecPolicyCreateBasicX509()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user