-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decode URIs before checking filename against manifest (#3571)
* test prerendering file with spaces (#1501) * decode URIs before matching against manifest * changeset
- Loading branch information
1 parent
ae4b0ae
commit 27239fa
Showing
5 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
Decode fetched resources before checking against manifest when prerendering |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/kit/test/prerendering/basics/src/routes/load-file-with-spaces.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script context="module"> | ||
/** @type {import('@sveltejs/kit').Load} */ | ||
export async function load({ fetch }) { | ||
const r1 = await fetch('/file%20with%20spaces.json'); | ||
const p1 = await r1.json(); | ||
const r2 = await fetch('/file with spaces.json'); | ||
const p2 = await r2.json(); | ||
if (p1.answer !== p2.answer) { | ||
throw new Error('oops'); | ||
} | ||
return { | ||
props: p1 | ||
}; | ||
} | ||
</script> | ||
|
||
<script> | ||
/** @type {number} */ | ||
export let answer; | ||
</script> | ||
|
||
<h1>answer: {answer}</h1> |
1 change: 1 addition & 0 deletions
1
packages/kit/test/prerendering/basics/static/file with spaces.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "answer": 42 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters