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

Unified Diff: tests/standalone/io/http_content_length_test.dart

Issue 11637017: Change the HTTP Content-Length handling (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
« sdk/lib/io/http_parser.dart ('K') | « sdk/lib/io/http_parser.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_content_length_test.dart
diff --git a/tests/standalone/io/http_content_length_test.dart b/tests/standalone/io/http_content_length_test.dart
index b1eea1e475773d400f07b8efdf6f91208b5992b0..ec22099e163041ead60b38f6e92acc7f015ce114 100644
--- a/tests/standalone/io/http_content_length_test.dart
+++ b/tests/standalone/io/http_content_length_test.dart
@@ -10,7 +10,7 @@ void testNoBody(int totalConnections, bool explicitContentLength) {
server.onError = (e) => Expect.fail("Unexpected error $e");
server.listen("127.0.0.1", 0, backlog: totalConnections);
server.defaultRequestHandler = (HttpRequest request, HttpResponse response) {
- Expect.isNull(request.headers.value('content-length'));
+ Expect.equals("0", request.headers.value('content-length'));
Expect.equals(0, request.contentLength);
response.contentLength = 0;
OutputStream stream = response.outputStream;
@@ -99,7 +99,7 @@ void testHttp10() {
server.listen("127.0.0.1", 0, backlog: 5);
server.defaultRequestHandler = (HttpRequest request, HttpResponse response) {
Expect.isNull(request.headers.value('content-length'));
- Expect.equals(0, request.contentLength);
+ Expect.equals(-1, request.contentLength);
response.contentLength = 0;
OutputStream stream = response.outputStream;
Expect.equals("1.0", request.protocolVersion);
« sdk/lib/io/http_parser.dart ('K') | « sdk/lib/io/http_parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698