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

Unified Diff: pkg/http/test/utils.dart

Issue 215533005: Fix a bug in [http.BaseRequest.send]'s content length handling. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months 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/http/test/streamed_request_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/test/utils.dart
diff --git a/pkg/http/test/utils.dart b/pkg/http/test/utils.dart
index 3797bd1b26d02592b2c25b6017a113390795088c..ba516c95886b797ab7f7ff217c7c2a376fffbe4a 100644
--- a/pkg/http/test/utils.dart
+++ b/pkg/http/test/utils.dart
@@ -54,6 +54,14 @@ Future startServer() {
return;
}
+ if (path == '/no-content-length') {
+ response.statusCode = 200;
+ response.contentLength = -1;
+ response.write('body');
+ response.close();
+ return;
+ }
+
new ByteStream(request).toBytes().then((requestBodyBytes) {
var outputEncoding;
var encodingName = request.uri.queryParameters['response-encoding'];
« no previous file with comments | « pkg/http/test/streamed_request_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698