Skip to content

Commit

Permalink
Version 3.3.0-26.0.dev
Browse files Browse the repository at this point in the history
Merge 24155ef into dev
  • Loading branch information
Dart CI committed Oct 14, 2023
2 parents 5844b34 + 24155ef commit 02e6d94
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
6 changes: 3 additions & 3 deletions sdk/lib/_http/http_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ class _HttpDetachedIncoming extends Stream<Uint8List> {
return _HttpDetachedStreamSubscription(subscription, bufferedData, onData)
..resume();
} else {
// TODO(26379): add test for this branch.
return Stream<Uint8List>.fromIterable([bufferedData!]).listen(onData,
onError: onError, onDone: onDone, cancelOnError: cancelOnError);
return Stream<Uint8List>.fromIterable([bufferedData ?? Uint8List(0)])
.listen(onData,
onError: onError, onDone: onDone, cancelOnError: cancelOnError);
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions tests/standalone/io/http_parser_header_add_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@

import "dart:async";
import "dart:io";
// ignore: IMPORT_INTERNAL_LIBRARY
import "dart:_http" show TestingClass$_HttpHeaders, TestingClass$_HttpParser;
import "package:async_helper/async_helper.dart";
import "package:expect/expect.dart";

typedef _HttpParser = TestingClass$_HttpParser;

Future<void> testFormatException() async {
final server = await HttpServer.bind("127.0.0.1", 0);
server.listen((HttpRequest request) {
Expand All @@ -28,6 +32,12 @@ Future<void> testFormatException() async {
}
}

void testNullSubscriptionData() {
_HttpParser httpParser = new _HttpParser.requestParser();
httpParser.detachIncoming().listen((data) {}, onDone: () {});
}

main() {
asyncTest(testFormatException);
testNullSubscriptionData();
}
2 changes: 1 addition & 1 deletion tools/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ CHANNEL dev
MAJOR 3
MINOR 3
PATCH 0
PRERELEASE 25
PRERELEASE 26
PRERELEASE_PATCH 0

0 comments on commit 02e6d94

Please sign in to comment.