Skip to content
This repository has been archived by the owner on Aug 1, 2019. It is now read-only.

Commit

Permalink
Merge pull request #46 from dart-lang/fix-path
Browse files Browse the repository at this point in the history
Support 2.3 paths
  • Loading branch information
grouma authored Apr 30, 2019
2 parents fe0b363 + 48d443e commit 110095f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.2.6+2

* Do not override path during `VMServiceClient.connect`.
* Fixes issues with connecting to Dart `2.3` observatory URIs.

## 0.2.6+1

* Allow `stream_channel` version 2.x
Expand Down
5 changes: 4 additions & 1 deletion lib/vm_service_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ class VMServiceClient {
}

var uri = url is String ? Uri.parse(url) : url;
if (uri.scheme == 'http') uri = uri.replace(scheme: 'ws', path: '/ws');
if (uri.scheme == 'http') {
var path = uri.path.endsWith('/') ? uri.path : uri.path + '/';
uri = uri.replace(scheme: 'ws', path: '${path}ws');
}

// TODO(nweiz): Just use [WebSocketChannel.connect] when cross-platform
// libraries work.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: vm_service_client
version: 0.2.6+1
version: 0.2.6+2
description: A client for the Dart VM service.
author: Dart Team <[email protected]>
homepage: https://github.com/dart-lang/vm_service_client
Expand Down

0 comments on commit 110095f

Please sign in to comment.