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

Unified Diff: sdk/lib/io/http_headers.dart

Issue 15001028: Fix type warnings in API and helpers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 years, 7 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 | « sdk/lib/_internal/compiler/implementation/lib/js_number.dart ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8153850133591827312f4a9bc838f7335b0426e6 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, value) {
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;
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/js_number.dart ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698