`redirect` should handle non-ASCII characters
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the bug
import { redirect } from '@sveltejs/kit';
export const load = () => {
redirect(303, '/ㄱ');
};
Server-side redirect with Korean characters result in [500] GET / error.
Invalid redirect location "/ㄱ": this string contains characters that cannot be used in HTTP headers
Reproduction
https://github.com/hyunbinseo/svelte-kit-templates/tree/svelte-kit-16054
System Info
System:
OS: Windows 11 10.0.26200
CPU: (8) x64 Intel(R) Core(TM) Ultra 7 258V
Memory: 8.07 GB / 31.48 GB
Binaries:
Node: 24.16.0 - C:\Users\hyunb\AppData\Local\fnm_multishells\7248_1781599625491\node.EXE
npm: 11.13.0 - C:\Users\hyunb\AppData\Local\fnm_multishells\7248_1781599625491\npm.CMD
pnpm: 11.5.1 - C:\Users\hyunb\AppData\Local\fnm_multishells\7248_1781599625491\pnpm.CMD
Deno: 2.4.0 - C:\Users\hyunb\.deno\bin\deno.EXE
Browsers:
Chrome: 149.0.7827.103
Edge: Chromium (149.0.4022.69)
Firefox: 151.0.4 - C:\Program Files\Mozilla Firefox\firefox.exe
npmPackages:
@sveltejs/adapter-auto: ^7.0.1 => 7.0.1
@sveltejs/kit: ^2.63.0 => 2.63.1
@sveltejs/vite-plugin-svelte: ^7.1.2 => 7.1.2
svelte: ^5.56.1 => 5.56.1
vite: ^8.0.16 => 8.0.16
Severity
annoyance
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction linked in the issue and trace the server-side redirect entry point used by redirect(303, '/ㄱ'). Confirm the failure with a non-ASCII location, then add coverage for this case and verify that the request no longer returns a 500 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100