Skip to content
Myr

Merge commit from fork

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

authored by Yusuke Wada · committed by GitHub · parent f0b094d · Browse files · 2 files+10 added−1 removed
This commit

State

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

Diff stats

2 files+10 added−1 removed

  • tests:+9 added−0 removed
  • other:+1 added−1 removed

2 files+10 added−1 removed

modified:src/middleware/serve-static/index.test.ts+9 added
77 unmodified lines
78 expect(res.headers.get('Content-Type')).toMatch(/^text\/plain/)79 expect(await res.text()).toBe('404 Not Found')80 })8182 it('Should not allow a backslash separator injection - /static/admin%5Csecret.txt', async () => {83 const res = await app.fetch({84 method: 'GET',85 url: 'http://localhost/static/admin%5Csecret.txt',86 } as Request)87 expect(res.status).toBe(404)88 expect(await res.text()).toBe('404 Not Found')89 })9091 it('Should return a pre-compressed zstd response - /static/hello.html', async () => {92 const app = new Hono().use(93 '*',94 baseServeStatic({
212 unmodified lines
modified:src/middleware/serve-static/index.ts+1 added-1 removed