@onekeyfe/react-native-sni-connect 3.0.81-alpha.8 → 3.0.81-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -149,7 +149,9 @@ final class SniConnectSessionInvalidationDelegate: NSObject, URLSessionDataDeleg
149
149
  dataTask: dataTask,
150
150
  didReceive: response,
151
151
  completionHandler: completionHandler
152
- ) ?? completionHandler(.cancel)
152
+ ) ?? completionHandler(
153
+ SniConnectSessionDelegatePolicy.responseDispositionWithoutForwardingDelegate
154
+ )
153
155
  }
154
156
 
155
157
  func urlSession(
@@ -1,5 +1,9 @@
1
1
  import Foundation
2
2
 
3
+ enum SniConnectSessionDelegatePolicy {
4
+ static let responseDispositionWithoutForwardingDelegate: URLSession.ResponseDisposition = .allow
5
+ }
6
+
3
7
  enum SniConnectCoreDiagnostics {
4
8
  static var warnSink: ((String) -> Void)?
5
9
 
@@ -3,6 +3,15 @@ import XCTest
3
3
 
4
4
  final class SniConnectValidationTests: XCTestCase {
5
5
 
6
+ func testSessionWithoutForwardingDataDelegateAllowsResponse() {
7
+ switch SniConnectSessionDelegatePolicy.responseDispositionWithoutForwardingDelegate {
8
+ case .allow:
9
+ break
10
+ default:
11
+ XCTFail("A session without a forwarding data delegate must allow its response")
12
+ }
13
+ }
14
+
6
15
  func testAcceptsValidRequestBoundaryValues() throws {
7
16
  XCTAssertNoThrow(try SniConnectValidation.validateRequestId("req-1"))
8
17
  XCTAssertNoThrow(try SniConnectValidation.validateTimeout(120_000))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-sni-connect",
3
- "version": "3.0.81-alpha.8",
3
+ "version": "3.0.81-alpha.9",
4
4
  "description": "A React Native library for SNI-based HTTP requests with DNS caching and request management",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",