-
-
Notifications
You must be signed in to change notification settings - Fork 7k
fix: remove special handling for Accept: text/html
#20376
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
fix: remove special handling for Accept: text/html
#20376
Conversation
I added a change to fix the test for #14626. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems it still works without that code because of:
Throwing ERR_LOAD_URL
is the same as returning null
when calling from the transform middleware: https://github.com/vitejs/vite/pull/10880/files#diff-6d94d6934079a4f09596acc9d3f3d38ea426c6f8e98cd766567335d42679ca7cR227
I would say this is fine, there is a comment already there
// Let other middleware handle if we can't load the url via transformRequest
This comment was marked as outdated.
This comment was marked as outdated.
commit: |
This comment was marked as outdated.
This comment was marked as outdated.
ladle's failure is caused by rollup/rollup#6012. I'll take a look at sveltekit's one. |
…ile cache is not used
/ecosystem-ci run |
This comment was marked as outdated.
This comment was marked as outdated.
📝 Ran ecosystem CI on
✅ astro, nuxt, analogjs, marko, qwik, rakkas, laravel, quasar, vitest, sveltekit, vite-plugin-cloudflare, vite-setup-catalogue, waku, react-router, vite-plugin-svelte, ladle, unocss, storybook, vitepress, vite-plugin-vue, vite-environment-examples, vite-plugin-pwa, vuepress |
Accept: text/html
Accept: text/html
Description
This special handling for
Accept: text/html
was added by 44a30d5 for #2051.But the original issue seems to be working without this code. Also only checking for
Accept: text/html
is problematic (#15025).So I removed this code. I think there won't be any problem, because when you access the path twice, the same behavior happens without this change.
fixes #17340