Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix per breaking change to HttpRequest and HttpClientResponse #216

Merged
merged 2 commits into from
Jul 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
## v2.1.1

* Forward-compatible fix for upcoming Dart SDK breaking change
(`HttpClientResponse` implementing `Stream<Uint8List>`)

## v2.1.0

* Full support of JsonWire and W3C protocol specs in sync and async WebDriver.

## v2.0.0
Expand Down
2 changes: 1 addition & 1 deletion lib/src/request/async_io_request_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class AsyncIoRequestClient extends AsyncRequestClient {
final response = await httpRequest.close();

return WebDriverResponse(response.statusCode, response.reasonPhrase,
await utf8.decodeStream(response));
await utf8.decodeStream(response.cast<List<int>>()));
} finally {
_lock.release();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/support/forwarder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class WebDriverForwarder {
}
Map<dynamic, dynamic> params;
if (request.method == 'POST') {
String requestBody = await utf8.decodeStream(request);
String requestBody = await utf8.decodeStream(request.cast<List<int>>());
if (requestBody != null && requestBody.isNotEmpty) {
params = json.decode(requestBody) as Map<dynamic, dynamic>;
}
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: webdriver
version: 2.1.0
version: 2.1.1
authors:
- Marc Fisher II <fisherii@google.com>
- Matt Staats<staats@google.com>
Expand Down