| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/uri.h" | 5 #include "vm/uri.h" |
| 6 | 6 |
| 7 #include "vm/zone.h" | 7 #include "vm/zone.h" |
| 8 | 8 |
| 9 namespace dart { | 9 namespace dart { |
| 10 | 10 |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 | 529 |
| 530 } else { | 530 } else { |
| 531 // Relative path. We need to merge the base path and the ref path. | 531 // Relative path. We need to merge the base path and the ref path. |
| 532 | 532 |
| 533 if (base.scheme == NULL && base.host == NULL && base.path[0] != '/') { | 533 if (base.scheme == NULL && base.host == NULL && base.path[0] != '/') { |
| 534 // The dart:core Uri class handles resolving a relative uri | 534 // The dart:core Uri class handles resolving a relative uri |
| 535 // against a second relative uri specially, in a way not | 535 // against a second relative uri specially, in a way not |
| 536 // described in the RFC. We do not need to support this for | 536 // described in the RFC. We do not need to support this for |
| 537 // library resolution. If we need to implement this later, we | 537 // library resolution. If we need to implement this later, we |
| 538 // can. | 538 // can. |
| 539 *target_uri = NULL; |
| 539 return false; | 540 return false; |
| 540 } | 541 } |
| 541 | 542 |
| 542 target.scheme = base.scheme; | 543 target.scheme = base.scheme; |
| 543 target.userinfo = base.userinfo; | 544 target.userinfo = base.userinfo; |
| 544 target.host = base.host; | 545 target.host = base.host; |
| 545 target.port = base.port; | 546 target.port = base.port; |
| 546 target.path = RemoveDotSegments(MergePaths(base.path, ref.path)); | 547 target.path = RemoveDotSegments(MergePaths(base.path, ref.path)); |
| 547 target.query = ref.query; | 548 target.query = ref.query; |
| 548 target.fragment = ref.fragment; | 549 target.fragment = ref.fragment; |
| 549 *target_uri = BuildUri(target); | 550 *target_uri = BuildUri(target); |
| 550 return true; | 551 return true; |
| 551 } | 552 } |
| 552 } | 553 } |
| 553 | 554 |
| 554 } // namespace dart | 555 } // namespace dart |
| OLD | NEW |