Chromium Code Reviews| Index: sdk/lib/io/http_headers.dart |
| diff --git a/sdk/lib/io/http_headers.dart b/sdk/lib/io/http_headers.dart |
| index bd56939cb3d249eb55efc24a0ee6c5c7550c2687..69cfc3f0bd9331c0768674bc1053b5f4f58db5b4 100644 |
| --- a/sdk/lib/io/http_headers.dart |
| +++ b/sdk/lib/io/http_headers.dart |
| @@ -17,8 +17,12 @@ class _HttpHeaders implements HttpHeaders { |
| String _host; |
| int _port; |
| - _HttpHeaders(this.protocolVersion) |
| - : _headers = new HashMap<String, List<String>>() { |
| + final int _defaultPort; |
| + |
| + _HttpHeaders(this.protocolVersion, |
| + {int defaultPort: HttpClient.DEFAULT_HTTP_PORT}) |
|
Søren Gjesse
2014/03/24 07:58:24
defaultPort -> defaultPortForScheme
Anders Johnsen
2014/03/24 08:01:57
Done.
|
| + : _headers = new HashMap<String, List<String>>(), |
| + _defaultPort = defaultPort { |
| if (protocolVersion == "1.0") { |
| _persistentConnection = false; |
| } |
| @@ -368,7 +372,7 @@ class _HttpHeaders implements HttpHeaders { |
| } |
| _updateHostHeader() { |
| - bool defaultPort = _port == null || _port == HttpClient.DEFAULT_HTTP_PORT; |
| + bool defaultPort = _port == null || _port == _defaultPort; |
| String portPart = defaultPort ? "" : ":$_port"; |
| _set("host", "$host$portPart"); |
| } |