Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(641)

Unified Diff: pkg/shelf_web_socket/test/web_socket_test.dart

Issue 810133002: Fix shelf_web_socket's Connection handling. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/shelf_web_socket/pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/shelf_web_socket/test/web_socket_test.dart
diff --git a/pkg/shelf_web_socket/test/web_socket_test.dart b/pkg/shelf_web_socket/test/web_socket_test.dart
index f9ae2dcd5aaf9da5914d34c2cf2cf751e5269520..aa9ea4188dcde4310a4ad9e575294b6c0b496a10 100644
--- a/pkg/shelf_web_socket/test/web_socket_test.dart
+++ b/pkg/shelf_web_socket/test/web_socket_test.dart
@@ -105,6 +105,20 @@ void main() {
});
});
+ // Regression test for issue 21894.
+ test("allows a Connection header with multiple values", () {
+ return shelf_io.serve(webSocketHandler((webSocket) {
+ webSocket.close();
+ }), "localhost", 0).then((server) {
+ var url = 'http://localhost:${server.port}/';
+
+ var headers = _handshakeHeaders;
+ headers['Connection'] = 'Other-Token, Upgrade';
+ expect(http.get(url, headers: headers).whenComplete(server.close),
+ hasStatus(101));
+ });
+ });
+
group("HTTP errors", () {
var server;
var url;
« no previous file with comments | « pkg/shelf_web_socket/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698