Index: pkg/shelf/test/shelf_io_test.dart |
diff --git a/pkg/shelf/test/shelf_io_test.dart b/pkg/shelf/test/shelf_io_test.dart |
index 1fa0e96f4642623b417d888aa4927c29d0967a0e..5152a697e7083b8db79e665e5c6c3b6b13e720de 100644 |
--- a/pkg/shelf/test/shelf_io_test.dart |
+++ b/pkg/shelf/test/shelf_io_test.dart |
@@ -84,10 +84,10 @@ void main() { |
var expectedUrl = 'http://localhost:$_serverPort$path'; |
expect(request.requestedUri, Uri.parse(expectedUrl)); |
- expect(request.pathInfo, '/foo/bar'); |
- expect(request.pathSegments, ['foo', 'bar']); |
+ expect(request.url.path, '/foo/bar'); |
+ expect(request.url.pathSegments, ['foo', 'bar']); |
expect(request.protocolVersion, '1.1'); |
- expect(request.queryString, 'qs=value'); |
+ expect(request.url.query, 'qs=value'); |
expect(request.scriptName, ''); |
return syncHandler(request); |
@@ -129,11 +129,16 @@ void main() { |
test('custom request headers are received by the handler', () { |
_scheduleServer((request) { |
expect(request.headers, containsPair('custom-header', 'client value')); |
+ |
+ // dart:io HttpServer splits multi-value headers into an array |
+ // validate that they are combined correctly |
+ expect(request.headers, containsPair('multi-header', 'foo,bar,baz')); |
return syncHandler(request); |
}); |
var headers = { |
- 'custom-header': 'client value' |
+ 'custom-header': 'client value', |
+ 'multi-header': 'foo,bar,baz' |
}; |
return _scheduleGet(headers: headers).then((response) { |