Compare commits

...

11 Commits

Author SHA1 Message Date
daltoniam 44ce58956f handle trailing slash better. bumped version 2017-10-04 21:54:22 -05:00
daltoniam c7cc1db0e3 fix for servers disliking not having a trailing slash. #394, #392 2017-10-02 13:08:10 -05:00
daltoniam a438ea1977 added armv7k 2017-09-27 15:12:41 -05:00
daltoniam b5991eda48 version update 2017-09-27 13:42:09 -05:00
Dalton 0a6f6d2a79 Merge pull request #388 from nuclearace/fix-http-headers
HTTP headers are case insensitive
2017-09-27 13:37:51 -05:00
Dalton 3fdf33a078 Merge pull request #390 from xjbeta/Fix-Deployment
Add macOS Deployment Target.
2017-09-27 13:36:04 -05:00
xjbeta 9f5f0f44f9 Add macOS Deployment Target. 2017-09-27 14:12:42 +08:00
Erik Little da7949d2da HTTP headers are case insensitive 2017-09-26 13:12:43 -04:00
Dalton dc48916804 Merge pull request #386 from lukkas/missing-arm64
add missing arm64
2017-09-26 11:51:03 -05:00
Lukasz Kasperek e0e8271725 add missing armv7 2017-09-26 15:57:04 +02:00
Lukasz Kasperek 411820d836 add missing arm64 2017-09-26 14:56:33 +02:00
8 changed files with 42 additions and 17 deletions
+18
View File
@@ -2,6 +2,24 @@
All notable changes to this project will be documented in this file.
`Starscream` adheres to [Semantic Versioning](http://semver.org/).
#### [3.0.1](https://github.com/daltoniam/Starscream/tree/3.0.2)
Small fixes for 3.0.1.
[#394](https://github.com/daltoniam/Starscream/issues/394)
[#392](https://github.com/daltoniam/Starscream/issues/392)
[#391](https://github.com/daltoniam/Starscream/issues/391)
#### [3.0.1](https://github.com/daltoniam/Starscream/tree/3.0.1)
Small fixes for 3.0.0.
[#389](https://github.com/daltoniam/Starscream/issues/389)
[#354](https://github.com/daltoniam/Starscream/issues/354)
[#386](https://github.com/daltoniam/Starscream/pull/386)
[#388](https://github.com/daltoniam/Starscream/pull/388)
[#390](https://github.com/daltoniam/Starscream/pull/390)
#### [3.0.0](https://github.com/daltoniam/Starscream/tree/3.0.0)
Major refactor and Swift 4 support. Additions include:
+2 -2
View File
@@ -261,7 +261,7 @@ To use Starscream in your project add the following 'Podfile' to your project
platform :ios, '9.0'
use_frameworks!
pod 'Starscream', '~> 3.0.0'
pod 'Starscream', '~> 3.0.2'
Then run:
@@ -283,7 +283,7 @@ $ brew install carthage
To integrate Starscream into your Xcode project using Carthage, specify it in your `Cartfile`:
```
github "daltoniam/Starscream" >= 3.0.0
github "daltoniam/Starscream" >= 3.0.2
```
### Rogue
+1 -1
View File
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.0.0</string>
<string>3.0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
+13 -9
View File
@@ -529,13 +529,16 @@ open class WebSocket : NSObject, StreamDelegate, WebSocketClient, WSStreamDelega
request.setValue(val, forHTTPHeaderField: headerWSExtensionName)
}
request.setValue("\(url.host!):\(port!)", forHTTPHeaderField: headerWSHostName)
var path = url.path
if path.isEmpty {
var path = url.absoluteString
let offset = (url.scheme?.characters.count ?? 2) + 3
path = String(path[path.index(path.startIndex, offsetBy: offset)..<path.endIndex])
if let range = path.range(of: "/") {
path = String(path[range.lowerBound..<path.endIndex])
} else {
path = "/"
}
if let query = url.query {
path += "?" + query
}
var httpBody = "\(request.httpMethod ?? "GET") \(path) HTTP/1.1\r\n"
if let headers = request.allHTTPHeaderFields {
for (key, val) in headers {
@@ -543,6 +546,7 @@ open class WebSocket : NSObject, StreamDelegate, WebSocketClient, WSStreamDelega
}
}
httpBody += "\r\n"
initStreamsWithData(httpBody.data(using: .utf8)!, Int(port!))
advancedDelegate?.websocketHttpUpgrade(socket: self, request: httpBody)
}
@@ -789,7 +793,7 @@ open class WebSocket : NSObject, StreamDelegate, WebSocketClient, WSStreamDelega
guard responseSplit.count > 1 else { break }
let key = responseSplit[0].trimmingCharacters(in: .whitespaces)
let val = responseSplit[1].trimmingCharacters(in: .whitespaces)
headers[key] = val
headers[key.lowercased()] = val
}
i += 1
}
@@ -798,11 +802,11 @@ open class WebSocket : NSObject, StreamDelegate, WebSocketClient, WSStreamDelega
return code
}
if let extensionHeader = headers[headerWSExtensionName] {
if let extensionHeader = headers[headerWSExtensionName.lowercased()] {
processExtensionHeader(extensionHeader)
}
if let acceptKey = headers[headerWSAcceptName] {
if let acceptKey = headers[headerWSAcceptName.lowercased()] {
if acceptKey.characters.count > 0 {
if headerSecKey.characters.count > 0 {
let sha = "\(headerSecKey)258EAFA5-E914-47DA-95CA-C5AB0DC85B11".sha1Base64()
@@ -978,7 +982,7 @@ open class WebSocket : NSObject, StreamDelegate, WebSocketClient, WSStreamDelega
if compressionState.messageNeedsDecompression, let decompressor = compressionState.decompressor {
do {
data = try decompressor.decompress(bytes: baseAddress+offset, count: Int(len), finish: isFin > 0)
if isFin > 0 && compressionState.serverNoContextTakeover{
if isFin > 0 && compressionState.serverNoContextTakeover {
try decompressor.reset()
}
} catch {
+1 -1
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Starscream"
s.version = "3.0.0"
s.version = "3.0.2"
s.summary = "A conforming WebSocket RFC 6455 client library in Swift."
s.homepage = "https://github.com/daltoniam/Starscream"
s.license = 'Apache License, Version 2.0'
+4 -2
View File
@@ -323,6 +323,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -334,7 +335,7 @@
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TVOS_DEPLOYMENT_TARGET = 10.0;
VALID_ARCHS = "i386 x86_64 armv7s";
VALID_ARCHS = "x86_64 i386 arm64 armv7s armv7 armv7k";
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
name = Debug;
@@ -355,6 +356,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.vluxe.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -366,7 +368,7 @@
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TVOS_DEPLOYMENT_TARGET = 10.0;
VALID_ARCHS = "i386 x86_64 armv7s";
VALID_ARCHS = "x86_64 i386 arm64 armv7s armv7 armv7k";
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
name = Release;
@@ -86,10 +86,11 @@ class ViewController: UIViewController {
if !once {
once = true
print("case:\(caseNum) finished")
//self?.verifyTest(caseNum) disabled since it slows down the tests
//self?.verifyTest(caseNum) //disabled since it slows down the tests
let nextCase = caseNum+1
if nextCase <= (self?.caseCount)! {
self?.getTestInfo(nextCase)
self?.runTest(nextCase)
//self?.getTestInfo(nextCase) //disabled since it slows down the tests
} else {
self?.finishReports()
}