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

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

Issue 772443002: Version 1.8.2 (Closed) Base URL: http://dart.googlecode.com/svn/branches/1.8/
Patch Set: Created 6 years 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 | « dart/runtime/vm/parser.cc ('k') | dart/tests/language/await_regression_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/io/http_impl.dart
===================================================================
--- dart/sdk/lib/io/http_impl.dart (revision 42030)
+++ dart/sdk/lib/io/http_impl.dart (working copy)
@@ -1329,8 +1329,11 @@
proxy,
_httpClient,
this);
+ // For the Host header an IPv6 address must be enclosed in []'s.
+ var host = uri.host;
+ if (host.contains(':')) host = "[$host]";
request.headers
- ..host = uri.host
+ ..host = host
..port = port
.._add(HttpHeaders.ACCEPT_ENCODING, "gzip");
if (_httpClient.userAgent != null) {
« no previous file with comments | « dart/runtime/vm/parser.cc ('k') | dart/tests/language/await_regression_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698