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

http_client_conformance_tests: Fix inconsistent test server behavior #1227

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ void hybridMain(StreamChannel<Object?> channel) async {
final request = utf8.decoder.bind(socket).transform(const LineSplitter());

final cookies = <String>[];
request.listen((line) {
await for (final line in request) {
if (line.toLowerCase().startsWith('cookie:')) {
cookies.add(line);
}

if (line.isEmpty) {
// A blank line indicates the end of the headers.
channel.sink.add(cookies);
break;
}
});
}

socket.writeAll(
[
Expand Down
Loading