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

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

Issue 65583004: Add utility methods for sending non-form data in pkg/http. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review Created 7 years, 1 month 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/mock_client_test.dart ('k') | pkg/oauth2/lib/src/authorization_code_grant.dart » ('j') | 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 f9a73813ac83756dd26328b0174c8f67c34363e8..f93ca253c159254093f0cc7ce99c5c2f61bd9eaf 100644
--- a/pkg/http/test/utils.dart
+++ b/pkg/http/test/utils.dart
@@ -73,7 +73,8 @@ Future startServer() {
var requestBody;
if (requestBodyBytes.isEmpty) {
requestBody = null;
- } else if (request.headers.contentType.charset != null) {
+ } else if (request.headers.contentType != null &&
+ request.headers.contentType.charset != null) {
var encoding = requiredEncodingForCharset(
request.headers.contentType.charset);
requestBody = encoding.decode(requestBodyBytes);
« no previous file with comments | « pkg/http/test/mock_client_test.dart ('k') | pkg/oauth2/lib/src/authorization_code_grant.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698