File tree Expand file tree Collapse file tree 3 files changed +8
-19
lines changed Expand file tree Collapse file tree 3 files changed +8
-19
lines changed Original file line number Diff line number Diff line change 11## 0.0.19 - 2019-05-?? (in progress)
2- * Update DevTools server to better handle failures when launching browsers
2+ * Update DevTools server to better handle failures when launching browsers.
3+ * Support additional formats for VM service uris.
34
45## 0.0.18 - 2019-04-30
5- * Fix release bug (0.0.17-dev.1 did not include build folder)
6+ * Fix release bug (0.0.17-dev.1 did not include build folder).
67* Add CPU profiler (preview) to timeline page.
78* CPU flame chart UI improvements and bug fixes.
89* Bug fixes for DevTools on Windows.
Original file line number Diff line number Diff line change @@ -150,22 +150,10 @@ String longestFittingSubstring(
150150/// For example, given a [value] of http://127.0.0.1:60667/72K34Xmq0X0=/#/vm,
151151/// this method will return the URI http://127.0.0.1:60667/72K34Xmq0X0=/.
152152Uri getTrimmedUri (String value) {
153- final startingUri = Uri .parse (value);
154- final startingPath = startingUri.path;
155-
156- if (startingPath.isEmpty || startingPath == '/' ) {
157- return Uri .parse (value);
158- }
159-
160- // [startingPath] should be of the form "/72K34Xmq0X0=/", but it could have
161- // trailing characters. Trim any excess chars beyond the second slash in the
162- // uri path.
163- final pathParts = startingPath.split ('/' );
164- final newPath = pathParts.take (2 ).join ('/' );
165- final indexOfPath = value.indexOf (newPath);
166-
167- // Add a trailing slash to the path.
168- return Uri .parse (value.substring (0 , indexOfPath + newPath.length) + '/' );
153+ final uri = Uri .parse (value.trim ());
154+ return uri
155+ .removeFragment ()
156+ .replace (path: uri.path.endsWith ('/' ) ? uri.path : '${uri .path }/' );
169157}
170158
171159class Property <T > {
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ void main() {
231231 );
232232 expect (
233233 getTrimmedUri ('http://127.0.0.1:60667' ).toString (),
234- equals ('http://127.0.0.1:60667' ),
234+ equals ('http://127.0.0.1:60667/ ' ),
235235 );
236236 expect (
237237 getTrimmedUri ('http://127.0.0.1:60667/' ).toString (),
You can’t perform that action at this time.
0 commit comments