-
Notifications
You must be signed in to change notification settings - Fork 396
Open
Labels
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior 😯
TypeError: Failed to execute 'fetch' on 'Window': Failed to read the 'headers' property from 'RequestInit': String contains non ISO-8859-1 code point.
at createRequest (server-runtime.js:94:12)
at fetchServerFunction (server-runtime.js:119:11)
at fn (server-runtime.js:175:32)
Expected behavior 🤔
no error
Steps to reproduce 🕹
Steps:
- create file
src/routes/中文.tsx
import { Title } from '@solidjs/meta';
import { createAsync, query } from '@solidjs/router';
import { createSignal, Suspense } from 'solid-js';
const getInfo = query(async (id: number) => {
'use server';
return { id };
}, 'getInfo');
export default function zh() {
const [uid, setUid] = createSignal(0);
const info = createAsync(() => getInfo(uid()));
return (
<main>
<Title>中文</Title>
<h1>id = {uid()}</h1>
<div class="flex gap-lg ">
<button onClick={() => setUid((n) => n + 1)}>id+1</button>
<button onClick={() => setUid((n) => n - 1)}>id-1</button>
</div>
<Suspense fallback="loading...">
<pre>data = {JSON.stringify(info(), null, 1)}</pre>
</Suspense>
</main>
);
}
- Visit the corresponding page
- click btn
id+1
Context 🔦
Because headers
does not allow special characters such as Chinese
But in x-server-id
there is a full path, Chinese characters will appear