Skip to content
Myr

fix(helper/proxy): missing proxy response status (#3927)

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

* test(helper/proxy): missing proxy response status * fix(helper/proxy): include status and statusText in the response

authored by Jonathan Haines · committed by GitHub · parent 6ae0213 · Browse files · 2 files+9 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+9 added−1 removed

  • tests:+7 added−0 removed
  • other:+2 added−1 removed

2 files+9 added−1 removed

modified:src/helper/proxy/index.test.ts+7 added
224 unmodified lines
225 controller.abort('client disconnect')226 const res = await resPromise227 expect(await res.text()).toBe('client disconnect')228 })229230 it('not found', async () => {231 const app = new Hono()232 app.get('/proxy/:path', (c) => proxy(`https://example.com/${c.req.param('path')}`))233 const res = await app.request('/proxy/404')234 expect(res.status).toBe(404)235 })236 })237})
modified:src/helper/proxy/index.ts+2 added-1 removed