Skip to content

[flutter_tools] use uri resolution for asset requests#50844

Merged
fluttergithubbot merged 3 commits intoflutter:masterfrom
jonahwilliams:fix_url_encoding
Feb 15, 2020
Merged

[flutter_tools] use uri resolution for asset requests#50844
fluttergithubbot merged 3 commits intoflutter:masterfrom
jonahwilliams:fix_url_encoding

Conversation

@jonahwilliams
Copy link
Copy Markdown
Contributor

Description

The debug flutter run server was not properly accounting for URI encoded assets. See: flutter/engine#16630

Instead of path munging, use Uri.resolve

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 15, 2020
Copy link
Copy Markdown
Contributor

@harryterkelsen harryterkelsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

}));

test('serves asset files from in filesystem with url-encoded paths', () => testbed.run(() async {
final File source = globals.fs.file(globals.fs.path.join('build', 'flutter_assets', Uri.encodeFull('abcd象形字.md')))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extreme nit: maybe change the extension to .png instead of .md

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants