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

Unified Diff: runtime/bin/websocket_impl.dart

Issue 11231070: Fix bug in HTTP client request generation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | « runtime/bin/http_parser.dart ('k') | tests/standalone/io/http_client_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/websocket_impl.dart
diff --git a/runtime/bin/websocket_impl.dart b/runtime/bin/websocket_impl.dart
index f3ccac957e3e8d457827c277a8d02644c6a7f620..f462713bcf2db1c43e27464682b8bab1775d31b0 100644
--- a/runtime/bin/websocket_impl.dart
+++ b/runtime/bin/websocket_impl.dart
@@ -775,15 +775,14 @@ class _WebSocket implements WebSocket {
throw new WebSocketException("Unsupported user info ${uri.userInfo}");
}
int port = uri.port == 0 ? HttpClient.DEFAULT_HTTP_PORT : uri.port;
- String path;
+ String path = uri.path;
+ if (path.length == 0) path = "/";
if (uri.query != "") {
if (uri.fragment != "") {
- path = "${uri.path}?${uri.query}#${uri.fragment}";
+ path = "${path}?${uri.query}#${uri.fragment}";
} else {
- path = "${uri.path}?${uri.query}";
+ path = "${path}?${uri.query}";
}
- } else {
- path = uri.path;
}
HttpClient client = new HttpClient();
« no previous file with comments | « runtime/bin/http_parser.dart ('k') | tests/standalone/io/http_client_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698