Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bun adapter cannot load webpage unless cache is disabled #779

Open
cysabi opened this issue Jun 18, 2024 · 2 comments
Open

Bun adapter cannot load webpage unless cache is disabled #779

cysabi opened this issue Jun 18, 2024 · 2 comments
Labels
bug Something isn't working needs reproduction

Comments

@cysabi
Copy link

cysabi commented Jun 18, 2024

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

@cysabi cysabi added the bug Something isn't working label Jun 18, 2024
@cysabi cysabi changed the title Bun adapter does not load web page unless cache is disabled Bun adapter cannot load webpage unless cache is disabled Jun 18, 2024
@pi0
Copy link
Member

pi0 commented Jun 19, 2024

Can you please make a reproduction? 🙏🏼

@cysabi
Copy link
Author

cysabi commented Jun 22, 2024

no problem !!

https://github.com/cysabi/bento/tree/h3-issues-779

  1. run bun ./index.ts
  2. open up the dev server, it should work on first load, because there's no cache. then subsequent reloads fail.
  3. open the network tab and disable cache, then try reloading :)

thanks for you hard work ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs reproduction
Projects
None yet
Development

No branches or pull requests

2 participants