Skip to content
Myr

refactor(mime): made `.ico` file's extension to `image/x-icon` (#462)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* refactor(mime): made `.ico` file's extension to `image/x-icon` * fixed deno and bun tests

authored by Yusuke Wada · committed by GitHub · parent 7345b81 · Browse files · 6 files+7 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

6 files+7 added−5 removed

  • tests:+3 added−2 removed
  • other:+4 added−3 removed

6 files+7 added−5 removed

modified:bun_test/index.test.tsx+1 added-1 removed
modified:deno_dist/utils/mime.ts+1 added-1 removed
28 unmodified lines
29 gz: 'application/gzip',30 gif: 'image/gif',31 htm: 'text/html',32 html: 'text/html',33 ico: 'image/vnd.microsoft.icon',33 ico: 'image/x-icon',34 ics: 'text/calendar',35 jar: 'application/java-archive',36 jpeg: 'image/jpeg',37 jpg: 'image/jpeg',
51 unmodified lines
modified:deno_dist/compose.ts+2 added-1 removed
modified:deno_test/middleware.test.tsx+1 added-1 removed
59 unmodified lines
60 const app = new Hono()61 app.all('/favicon.ico', serveStatic({ path: './deno_test/favicon.ico' }))62 const res = await app.request('http://localhost/favicon.ico')63 assertEquals(res.status, 200)64 assertEquals(res.headers.get('Content-Type'), 'image/vnd.microsoft.icon')64 assertEquals(res.headers.get('Content-Type'), 'image/x-icon')65})6667Deno.test('JWT Authentication middleware', async () => {68 const app = new Hono()
25 unmodified lines
modified:src/utils/mime.test.ts+1 added
modified:src/utils/mime.ts+1 added-1 removed
28 unmodified lines
29 gz: 'application/gzip',30 gif: 'image/gif',31 htm: 'text/html',32 html: 'text/html',33 ico: 'image/vnd.microsoft.icon',33 ico: 'image/x-icon',34 ics: 'text/calendar',35 jar: 'application/java-archive',36 jpeg: 'image/jpeg',37 jpg: 'image/jpeg',
51 unmodified lines