We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3567f8 commit b522000Copy full SHA for b522000
pkgs/http_client_conformance_tests/lib/src/request_cookies_server.dart
@@ -25,16 +25,17 @@ void hybridMain(StreamChannel<Object?> channel) async {
25
final request = utf8.decoder.bind(socket).transform(const LineSplitter());
26
27
final cookies = <String>[];
28
- request.listen((line) {
+ await for (final line in request) {
29
if (line.toLowerCase().startsWith('cookie:')) {
30
cookies.add(line);
31
}
32
33
if (line.isEmpty) {
34
// A blank line indicates the end of the headers.
35
channel.sink.add(cookies);
36
+ break;
37
- });
38
+ }
39
40
socket.writeAll(
41
[
0 commit comments