Index: sdk/lib/io/http_headers.dart |
diff --git a/sdk/lib/io/http_headers.dart b/sdk/lib/io/http_headers.dart |
index 6b14ae2d6c89208388f3ed676f8f12b537e3de49..3769b3f0d04949bb1aa6e1ce5bbfee041ef9aa21 100644 |
--- a/sdk/lib/io/http_headers.dart |
+++ b/sdk/lib/io/http_headers.dart |
@@ -760,12 +760,12 @@ class _HeaderValue implements HeaderValue { |
} |
maybeExpect("="); |
skipWS(); |
- if(done()) { |
+ if (done()) { |
parameters[name] = null; |
return; |
} |
String value = parseParameterValue(); |
- if (name == 'charset' && this is _ContentType) { |
+ if (name == 'charset' && this is _ContentType && value != null) { |
// Charset parameter of ContentTypes are always lower-case. |
value = value.toLowerCase(); |
} |