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

Fix for fetching blob URLs in Rust WebAssembly using reqwest #1797

Merged
merged 1 commit into from Apr 10, 2023

Conversation

skyf0l
Copy link
Contributor

@skyf0l skyf0l commented Apr 10, 2023

I encountered an issue when trying to fetch a blob URL in Rust WebAssembly using reqwest. The error message stated that the URL scheme was not allowed. It was due to the parsing of the URL, so I fixed it.

Fix #1796

Thank you for considering this pull request!

@@ -21,6 +21,14 @@ pub trait IntoUrlSealed {

impl IntoUrlSealed for Url {
fn into_url(self) -> crate::Result<Url> {
#[cfg(target_arch = "wasm32")]
Copy link
Owner

Choose a reason for hiding this comment

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

Just so I understand this, the issue was that the next check, has_host(), was false, and so the scheme was considered bad? If that's so, it'd be good to include a code comment here explaining that, so we remember why this check is here :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, I just added an explanation.

Copy link
Owner

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

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

Thanks!

@seanmonstar seanmonstar merged commit 2fa69ad into seanmonstar:master Apr 10, 2023
31 checks passed
kodiakhq bot pushed a commit to pdylanross/fatigue that referenced this pull request May 1, 2023
Bumps reqwest from 0.11.16 to 0.11.17.

Release notes
Sourced from reqwest's releases.

v0.11.17
What's Changed

Upgrade internal dependencies of Experimental HTTP/3 to use quinn v0.9
(wasm) Fix blob url support

New Contributors

@​skyf0l made their first contribution in seanmonstar/reqwest#1797




Changelog
Sourced from reqwest's changelog.

v0.11.17

Upgrade internal dependencies of Experimental HTTP/3 to use quinn v0.9
(wasm) Fix blob url support




Commits

eeca649 v0.11.17
b4d5ab0 update h3 and h3-quinn to 0.0.2 (#1811)
2fa69ad wasm: blob url support (#1797)
See full diff in compare view




Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot merge will merge this PR after your CI passes on it
@dependabot squash and merge will squash and merge this PR after your CI passes on it
@dependabot cancel merge will cancel a previously requested merge and block automerging
@dependabot reopen will reopen this PR if it is closed
@dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for fetching blob URLs in Rust WebAssembly using reqwest
2 participants