Bun adapter cannot load webpage unless cache is disabled
environment
"h3": "^1.11.1", "vite": "^5.2.11", "typescript": "^5.0.0" bun v1.1.13
reproduction
combine bun, vite (dev server middleware mode), and h3. attempt to serve the vite dev server through h3 with the bun adapter go to localhost on your browser, now try disabling cache in the network tab
describe the bug
the webpage will stall on "waiting for localhost" indefinitely. turning off cache makes the webpage load near instantly. my domain knowledge in http is not very good, but i presume it has something to do with the cache headers not being passed to bun.serve properly?
additional context
this only happens with the bun adapter, using the node adapter on the bun runtime works completely fine
logs
Can you please make a reproduction? 🙏🏼
no problem !!
https://github.com/cysabi/bento/tree/h3-issues-779
- run
bun ./index.ts - open up the dev server, it should work on first load, because there's no cache. then subsequent reloads fail.
- open the network tab and disable cache, then try reloading :)
thanks for you hard work ❤️
https://github.com/h3js/h3/pull/1028#issuecomment-2935516547