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

WHATWG URL class can't handle urls with non-standard protocols #35

Open
feross opened this issue Aug 9, 2019 · 1 comment
Open

WHATWG URL class can't handle urls with non-standard protocols #35

feross opened this issue Aug 9, 2019 · 1 comment
Labels

Comments

@feross
Copy link
Member

feross commented Aug 9, 2019

Summary

What is needed. A one paragraph explanation of what this is about.

Folks interested in dweb protocols might be interested to know that the WHATWG URL object in browsers don't parse dat:// or ipfs: or ipns: or magnet: or almost any non-standard URL scheme in either Chrome or Firefox.

Motivation

Why is it needed? What does it unlock?

Without built-in support for parsing these protocols, we have to ship our own userland implementations of URL parsers like https://github.com/defunctzombie/node-url which adds lots of JS to our bundles.

Centralized protocols like http: shouldn't get special treatment by the URL parser. Plus, URL works correctly in Node.js and Safari. We just need to fix the implementations in Chrome and Firefox.

Bug reports here:

@feross feross added bug Something isn't working difficulty:easy P2 - Medium labels Aug 9, 2019
@pfrazee
Copy link

pfrazee commented Aug 9, 2019

FWIW in Beaker (which uses Chromium via Electron) the dat: URLs parse correctly. I believe it's because dat: is registered in a Chromium system as a "Standard URL" and so it is given the parsing rules of HTTP URLs, but I haven't checked to see if it's a behavior that Electron patches in (rather than Chromium doing it). I just mention this because this might not be terribly difficult to solve in Chromium if your scheme design is similar to HTTPS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants