Index: sdk/lib/io/http_headers.dart |
diff --git a/sdk/lib/io/http_headers.dart b/sdk/lib/io/http_headers.dart |
index 598371732c81b9b090e019dd309c90b675b4d1f2..bbefd45672785b09784655f19d58112fa014a6b9 100644 |
--- a/sdk/lib/io/http_headers.dart |
+++ b/sdk/lib/io/http_headers.dart |
@@ -207,7 +207,7 @@ class _HttpHeaders implements HttpHeaders { |
_set(HttpHeaders.CONTENT_TYPE, contentType.toString()); |
} |
- void _add(String name, Object value) { |
+ void _add(String name, var value) { |
Søren Gjesse
2013/05/15 12:55:03
Can't you remove var here? In other places in dart
Johnni Winther
2013/05/17 12:06:42
Done.
|
var lowerCaseName = name.toLowerCase(); |
// TODO(sgjesse): Add immutable state throw HttpException is immutable. |
if (lowerCaseName == HttpHeaders.CONTENT_LENGTH) { |
@@ -250,13 +250,13 @@ class _HttpHeaders implements HttpHeaders { |
} |
} else if (lowerCaseName == HttpHeaders.HOST) { |
if (value is String) { |
- int pos = (value as String).indexOf(":"); |
+ int pos = value.indexOf(":"); |
if (pos == -1) { |
_host = value; |
_port = HttpClient.DEFAULT_HTTP_PORT; |
} else { |
if (pos > 0) { |
- _host = (value as String).substring(0, pos); |
+ _host = value.substring(0, pos); |
} else { |
_host = null; |
} |