Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uri.removeFragment() corrupts URIs #24593

Closed
nex3 opened this issue Oct 15, 2015 · 1 comment
Closed

Uri.removeFragment() corrupts URIs #24593

nex3 opened this issue Oct 15, 2015 · 1 comment
Assignees
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-core

Comments

@nex3
Copy link
Member

nex3 commented Oct 15, 2015

If I run Uri.parse("foo:bar#baz").removeFragment().toString(), I get "foo://:0bar?", where I'd just expect "foo:bar". This is particularly problematic for working with data: URIs, which aren't at all structured like typical hierarchical URIs and whose fragments must be ignored.

@nex3 nex3 added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-core labels Oct 15, 2015
@lrhn lrhn self-assigned this Oct 15, 2015
lrhn added a commit that referenced this issue Oct 15, 2015
It used the external getters for the existing port and query, which
are non-null even when the port or query are absent. This introduced
a new default-valued/empty part.

Also reordered declarations to have fields > constructors > rest.

Fixes issue #24593
BUG= http://dartbug.com/24593
R=asgerf@google.com

Review URL: https://codereview.chromium.org/1396973004.
@lrhn
Copy link
Member

lrhn commented Oct 15, 2015

Good catch! Fixed.

@lrhn lrhn closed this as completed Oct 15, 2015
lrhn added a commit that referenced this issue Oct 19, 2015
It used the external getters for the existing port and query, which
are non-null even when the port or query are absent. This introduced
a new default-valued/empty part.

Also reordered declarations to have fields > constructors > rest.

Fixes issue #24593
BUG= http://dartbug.com/24593
R=asgerf@google.com

Review URL: https://codereview.chromium.org/1396973004.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-core
Projects
None yet
Development

No branches or pull requests

2 participants