[ package:dds ] Allow for JSON-RPC 2.0 requests which are missing the jsonrpc parameter

Fixes https://github.com/dart-lang/sdk/issues/41942

Change-Id: Ibbe560a70ba7b6ab1d09d46fada3f1738ea425a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148512
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This commit is contained in:
Ben Konyi 2020-05-18 23:00:49 +00:00 committed by commit-bot@chromium.org
parent 46a5398b0a
commit 01fd2c480e
4 changed files with 5 additions and 2 deletions

2
DEPS
View file

@ -105,7 +105,7 @@ vars = {
"idl_parser_rev": "5fb1ebf49d235b5a70c9f49047e83b0654031eb7",
"intl_tag": "0.16.1",
"jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
"json_rpc_2_tag": "eec10819a40e7bf2e401f2b97368776a90cc5550",
"json_rpc_2_tag": "d589e635d8ccb7cda6a804bd571f88abbabab146",
"linter_tag": "0.1.115",
"logging_tag": "9561ba016ae607747ae69b846c0e10958ca58ed4",
"markupsafe_rev": "8f45f5cfa0009d2a70589bcda0349b8cb2b72783",

View file

@ -3,6 +3,7 @@
- Added `getDartDevelopmentServiceVersion` RPC.
- Added DDS protocol to VM service `getSupportedProtocols` response.
- Added example/example.dart.
- Allow for JSON-RPC 2.0 requests which are missing the `jsonrpc` parameter.
# 1.0.0

View file

@ -34,6 +34,8 @@ class _BinaryCompatiblePeer extends json_rpc.Peer {
),
),
),
// Allow for requests without the jsonrpc parameter.
strictProtocolChecks: false,
);
static void _transformStream(

View file

@ -12,7 +12,7 @@ environment:
dependencies:
async: ^2.4.1
json_rpc_2: ^2.1.0
json_rpc_2: ^2.2.0
meta: ^1.1.8
pedantic: ^1.7.0
shelf: ^0.7.5