Skip to content

feat: send 408 on request timeout#22476

Merged
sapphi-red merged 1 commit into
vitejs:mainfrom
thatguystone:main
May 25, 2026
Merged

feat: send 408 on request timeout#22476
sapphi-red merged 1 commit into
vitejs:mainfrom
thatguystone:main

Conversation

@thatguystone
Copy link
Copy Markdown
Contributor

This is a pretty tiny nit, but when running vite behind a reverse proxy, the proxy is logging errors about getting a 400 response from vite with no active request.

According to MDN, a 408 is more appropriate, and many servers already use it.

@thatguystone thatguystone changed the title feat: Send 408 on request timeout feat: send 408 on request timeout May 19, 2026
bluwy
bluwy previously approved these changes May 19, 2026
@bluwy
Copy link
Copy Markdown
Member

bluwy commented May 19, 2026

Looks like this needs a pnpm format to format the code

bluwy
bluwy previously approved these changes May 20, 2026
Comment thread packages/vite/src/node/http.ts
@sapphi-red sapphi-red added the p2-nice-to-have Not breaking anything but nice to have (priority) label May 21, 2026
@sapphi-red sapphi-red added feat: dev dev server and removed feat: dev dev server labels May 25, 2026
@sapphi-red sapphi-red merged commit c85c9ee into vitejs:main May 25, 2026
32 of 35 checks passed
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Jun 6, 2026
| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| npm        | vite    | 8.0.14 | 8.0.16 |


## [v8.0.16](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-8016-2026-06-01-small)

##### Bug Fixes

- **deps:** reject UNC paths for launch-editor-middleware ([#22571](vitejs/vite#22571)) ([50b9512](vitejs/vite@50b9512))
- reject windows alternate paths ([#22572](vitejs/vite#22572)) ([dc245c7](vitejs/vite@dc245c7))


## [v8.0.15](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-8015-2026-06-01-small)

##### Features

- send 408 on request timeout ([#22476](vitejs/vite#22476)) ([c85c9ee](vitejs/vite@c85c9ee))
- update rolldown to 1.0.3 ([#22538](vitejs/vite#22538)) ([646dbed](vitejs/vite@646dbed))

##### Bug Fixes

- capitalize error messages and remove spurious space in parse error ([#22488](vitejs/vite#22488)) ([85a0eff](vitejs/vite@85a0eff))
- **deps:** update all non-major dependencies ([#22511](vitejs/vite#22511)) ([2686d7d](vitejs/vite@2686d7d))
- **dev:** fix html-proxy cache key mismatch for /@fs/ HTML paths ([#21762](vitejs/vite#21762)) ([47c4213](vitejs/vite@47c4213))
- **glob:** error on relative glob in virtual module when no files match ([#22497](vitejs/vite#22497)) ([5c8e98f](vitejs/vite@5c8e98f))
- **optimizer:** close the rolldown bundle when write() rejects ([#22528](vitejs/vite#22528)) ([e3cfb9d](vitejs/vite@e3cfb9d))
- **resolve:** provide onWarn for viteResolvePlugin in JS plugin containers ([#22509](vitejs/vite#22509)) ([40985f1](vitejs/vite@40985f1))

##### Miscellaneous Chores

- **deps:** update rolldown-related dependencies ([#22566](vitejs/vite#22566)) ([3052a67](vitejs/vite@3052a67))

##### Code Refactoring

- correct logic in `collectAllModules` function ([#22562](vitejs/vite#22562)) ([6978a9c](vitejs/vite@6978a9c))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p2-nice-to-have Not breaking anything but nice to have (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants