Extra junk in url's produced by UriMatch.match
Open
- Dominant language
- Dart
- Stars
- 80
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
```
final p = new UriParser(new UriTemplate('/ui'));
final match = p.match(Uri.parse('http://localhost:8080/ui/foo'));
print(match.rest);
```
Expected
```
/foo
```
Actual
```
///foo?#
```
**Cause**
`UriMatch` builds (via `UriBuilder`) a uri with '' rather than null in fragment and host, plus an empty map for queryParameters.
`Uri.toString()` assume all those are null or have something interesting in them.
Note: I would consider it a bug in Uri to required null queryParameters as empty collections are normally considered better practice than null
Contributor guide
Assessment
This issue has not been assessed yet.