-
Notifications
You must be signed in to change notification settings - Fork 73
Double slash backtracking spec clarification #253
Comments
What does the reference implementation do? |
The reference implementation throws -
|
Ah, it seems the issue is it is doing Interestingly this implies the following is valid: <!doctype html>
<script type="importmap">
{
"imports": {
"x/": "/y/"
}
}
</script>
<script type="module">
import 'x//y/z';
</script> And will resolve to |
Oh, you are doing this on a |
The example above applies equally well to https URLs as it does file URLs. Basically because
I hope you realise this is a major consumption point of this spec for the major server JS platforms. Deno relies on this,as does Node.js where users ship loaders supporting import maps and the only way that applies to local modules in both runtimes is via file urls. |
It seems this behaviour is a direct consequence of #173 in using URL resolution over string concatenation to handle eg paths in querystrings. On balance I agree this edge case is less confusing than the weird string concat edge case alternatives. |
Is this a chrome bug or spec bug?
Gives the error:
Whereas
x/y//p
would be supported fine.Reading the spec, I can't see why this would be specifically distinguished in this case since
/y//p
is a subpath of/y/
.The text was updated successfully, but these errors were encountered: