Change in dart/sdk[main]: exposed http client for web sockets

5 views
Skip to first unread message

Copybara Prod (Gerrit)

unread,
Sep 9, 2021, 9:22:26 AM9/9/21
to rev...@dartlang.org

Copybara Prod uploaded patch set #5 to this change.

View Change

exposed http client for web sockets

Solution for certificate pinning for web sockets.
Solves [#34284](https://github.com/dart-lang/sdk/issues/34284)

Closes https://github.com/dart-lang/sdk/pull/46040
https://github.com/dart-lang/sdk/pull/46040

GitOrigin-RevId: 82c924963e47263af0ca2c583f0ee06ac2487bbd
Change-Id: I042b1e3fa7a4effed076c0deeec1f86af0dfe26d
---
M sdk/lib/_http/websocket.dart
M sdk/lib/_http/websocket_impl.dart
M tests/standalone/io/web_socket_test.dart
M tests/standalone_2/io/web_socket_test.dart
4 files changed, 50 insertions(+), 9 deletions(-)

To view, visit change 200262. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I042b1e3fa7a4effed076c0deeec1f86af0dfe26d
Gerrit-Change-Number: 200262
Gerrit-PatchSet: 5
Gerrit-Owner: Copybara Prod <copybara-wor...@google.com>
Gerrit-Reviewer: Alexander Aprelev <a...@google.com>
Gerrit-Reviewer: Siva Annamalai <as...@google.com>
Gerrit-CC: Dart Reviews <rev...@dartlang.org>
Gerrit-CC: Liam Appelbe <li...@google.com>
Gerrit-CC: Michael Thomsen <m...@google.com>
Gerrit-MessageType: newpatchset

Copybara Prod (Gerrit)

unread,
Sep 9, 2021, 12:11:38 PM9/9/21
to rev...@dartlang.org

Copybara Prod uploaded patch set #6 to this change.

View Change

exposed http client for web sockets

Solution for certificate pinning for web sockets.
Solves [#34284](https://github.com/dart-lang/sdk/issues/34284)

Closes https://github.com/dart-lang/sdk/pull/46040
https://github.com/dart-lang/sdk/pull/46040

GitOrigin-RevId: 08ff72f8e370bb80f4aac08c27648bfae84f7ff0

Change-Id: I042b1e3fa7a4effed076c0deeec1f86af0dfe26d
---
M sdk/lib/_http/websocket.dart
M sdk/lib/_http/websocket_impl.dart
M tests/standalone/io/web_socket_error_test.dart
M tests/standalone/io/web_socket_test.dart
M tests/standalone_2/io/web_socket_test.dart
5 files changed, 56 insertions(+), 14 deletions(-)

To view, visit change 200262. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I042b1e3fa7a4effed076c0deeec1f86af0dfe26d
Gerrit-Change-Number: 200262
Gerrit-PatchSet: 6

Copybara Prod (Gerrit)

unread,
Sep 9, 2021, 12:45:55 PM9/9/21
to rev...@dartlang.org

Copybara Prod uploaded patch set #7 to this change.

View Change

exposed http client for web sockets

[io/http] Add a HTTP Client parameter on WebSocket.connect to allow a custom HTTP Client for web socket connections.

The WebSocket abstract class was changed to allow an optional parameter called customClient that takes in a HTTPClient and passes it to the WebSocket Implementation.
The WebSocket implementation takes the customClient, checks if its null, if its not null, it uses the customClient in place of the static HTTPClient that the WebSocket Implementation offers.
This custom client does not override the static HTTPClient, so all previous functionality remains the same when the customClient is not present.

Test = testStaticClientUserAgentStaysTheSame() in web_socket_test.dart in standalone_2/standalone
Test = new SecurityConfiguration(secure: true).runTests(); in web_socket_error_test.dart

Bug: https://github.com/dart-lang/sdk/issues/34284
GitOrigin-RevId: aa0a16db477949fdafeb53481a3a9aadeb3250e5

Change-Id: I042b1e3fa7a4effed076c0deeec1f86af0dfe26d
---
M sdk/lib/_http/websocket.dart
M sdk/lib/_http/websocket_impl.dart
M tests/standalone/io/web_socket_error_test.dart
M tests/standalone/io/web_socket_test.dart
M tests/standalone_2/io/web_socket_test.dart
5 files changed, 56 insertions(+), 14 deletions(-)

To view, visit change 200262. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I042b1e3fa7a4effed076c0deeec1f86af0dfe26d
Gerrit-Change-Number: 200262
Gerrit-PatchSet: 7

Copybara Prod (Gerrit)

unread,
Sep 9, 2021, 12:58:01 PM9/9/21
to rev...@dartlang.org

Copybara Prod uploaded patch set #8 to this change.

View Change

exposed http client for web sockets

[io/http] Add a HTTP Client parameter on WebSocket.connect to allow a custom HTTP Client for web socket connections.

The WebSocket abstract class was changed to allow an optional parameter called customClient that takes in a HTTPClient and passes it to the WebSocket Implementation.
The WebSocket implementation takes the customClient, checks if its null, if its not null, it uses the customClient in place of the static HTTPClient that the WebSocket Implementation offers.
This custom client does not override the static HTTPClient, so all previous functionality remains the same when the customClient is not present.

Test = testStaticClientUserAgentStaysTheSame() in web_socket_test.dart in standalone_2/standalone
Test = new SecurityConfiguration(secure: true).runTests(); in web_socket_error_test.dart

Bug: https://github.com/dart-lang/sdk/issues/34284

Closes https://github.com/dart-lang/sdk/pull/46040
https://github.com/dart-lang/sdk/pull/46040

GitOrigin-RevId: 7ff02a3e6665f903d8b1d02bb2cdb6d45c81d644

Change-Id: I042b1e3fa7a4effed076c0deeec1f86af0dfe26d
---
M sdk/lib/_http/websocket.dart
M sdk/lib/_http/websocket_impl.dart
M tests/standalone/io/web_socket_error_test.dart
M tests/standalone/io/web_socket_test.dart
M tests/standalone_2/io/web_socket_test.dart
5 files changed, 56 insertions(+), 14 deletions(-)

To view, visit change 200262. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I042b1e3fa7a4effed076c0deeec1f86af0dfe26d
Gerrit-Change-Number: 200262
Gerrit-PatchSet: 8
Reply all
Reply to author
Forward
0 new messages