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

A restriction for URL; URL can have a fragment or credentials parts? #11

Open
hayatoito opened this issue Aug 3, 2021 · 2 comments
Open

Comments

@hayatoito
Copy link
Collaborator

It seems we had a restriction that a URL can't have a fragment nor credentials parts,
however, it seems these restriction were removed from the format at this commit. WICG/webpackage@826cadf

  1. For each (url, responses) entry in the index map:
    1. Let parsedUrl be the result of parsing ({{URL}}) url with
      no base URL.
  2. If parsedUrl is a failure, its fragment is not null, or it includes
    credentials, return an error.

It is a bit unclear whether this removal was intentionally done or not.

If this was intentionally done, that might be fine.
We don't have any restriction on the format itself. Instead, each use case can introduce such a restriction.

e.g.
Subresource loading will ignore a URL which has a fragment.

cc: @jyasskin

It would be better to clarify our intention in this issue.

@jyasskin
Copy link
Collaborator

jyasskin commented Aug 3, 2021

I didn't intend that change to make the subresource loading use case more lenient, but I think the WG could decide either way on whether the format itself forbids URLs with fragments or credentials.

I suggest we say that index entries MUST NOT include fragments or credentials, but of course the use cases will have to explicitly specify what to do when bundles violate that requirement.

@hayatoito
Copy link
Collaborator Author

Thanks for clarification. I appreciate it!

suggest we say that index entries MUST NOT include fragments or credentials

That sounds reasonable to me, and matches the current chromium's bundle parser's implementation, and the behavior of CLI tools, I think, though I don't have a strong preference here.

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

No branches or pull requests

2 participants