| Index: sdk/lib/core/uri.dart
|
| diff --git a/sdk/lib/core/uri.dart b/sdk/lib/core/uri.dart
|
| index 503509946adfbaf2773a5809d73c837396c68882..f80a30018e9e14680c63fd30b9aebbe8f952d9b3 100644
|
| --- a/sdk/lib/core/uri.dart
|
| +++ b/sdk/lib/core/uri.dart
|
| @@ -971,7 +971,7 @@ class Uri {
|
| }
|
| _checkNonWindowsPathReservedCharacters(pathSegments, false);
|
| var result = new StringBuffer();
|
| - if (isAbsolute) result.write("/");
|
| + if (_isPathAbsolute) result.write("/");
|
| result.writeAll(pathSegments, "/");
|
| return result.toString();
|
| }
|
| @@ -989,7 +989,7 @@ class Uri {
|
| _checkWindowsPathReservedCharacters(segments, false);
|
| }
|
| var result = new StringBuffer();
|
| - if (isAbsolute && !hasDriveLetter) result.write("\\");
|
| + if (_isPathAbsolute && !hasDriveLetter) result.write("\\");
|
| if (host != "") {
|
| result.write("\\");
|
| result.write(host);
|
| @@ -1000,6 +1000,11 @@ class Uri {
|
| return result.toString();
|
| }
|
|
|
| + bool get _isPathAbsolute {
|
| + if (path == null || path.isEmpty) return false;
|
| + return path.startsWith('/');
|
| + }
|
| +
|
| void _writeAuthority(StringSink ss) {
|
| _addIfNonEmpty(ss, userInfo, userInfo, "@");
|
| ss.write(_host == null ? "null" : _host);
|
|
|