bun-router 0.2.4 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/router/router.ts +2 -5
- package/package.json +1 -1
- package/tests/router.test.ts +1 -1
package/lib/router/router.ts
CHANGED
@@ -35,13 +35,10 @@ const file = async (filepath: string): Promise<Response> => {
|
|
35
35
|
}
|
36
36
|
|
37
37
|
const html = async (content: string): Promise<Response> => {
|
38
|
-
const
|
39
|
-
const c = buff.toString('hex');
|
40
|
-
|
41
|
-
const response = new Response(c, {
|
38
|
+
const response = new Response(content, {
|
42
39
|
status: 200,
|
43
40
|
statusText: 'ok',
|
44
|
-
headers: {'Content-Type': 'text/html'},
|
41
|
+
headers: {'Content-Type': 'text/html; charset=utf-8'},
|
45
42
|
});
|
46
43
|
|
47
44
|
return new Promise<Response>((resolve) => {
|
package/package.json
CHANGED
package/tests/router.test.ts
CHANGED