mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
## Summary This PR fixes multiple HTTP/2 protocol compliance issues that were causing stream errors with various HTTP/2 clients (Fauna, gRPC/Connect, etc.). fixes https://github.com/oven-sh/bun/issues/12544 fixes https://github.com/oven-sh/bun/issues/25589 ### Key Fixes **Window Size and Settings Handling** - Fix initial stream window size to use `DEFAULT_WINDOW_SIZE` until `SETTINGS_ACK` is received - Per RFC 7540 Section 6.5.1: The sender can only rely on settings being applied AFTER receiving `SETTINGS_ACK` - Properly adjust existing stream windows when `INITIAL_WINDOW_SIZE` setting changes (RFC 7540 Section 6.9.2) **Header List Size Enforcement** - Implement `maxHeaderListSize` checking per RFC 7540 Section 6.5.2 - Track cumulative header list size using HPACK entry overhead (32 bytes per RFC 7541 Section 4.1) - Reject streams with `ENHANCE_YOUR_CALM` when header list exceeds configured limit **Custom Settings Support** - Add validation for `customSettings` option (up to 10 custom settings, matching Node.js `MAX_ADDITIONAL_SETTINGS`) - Validate setting IDs are in range `[0, 0xFFFF]` per RFC 7540 - Validate setting values are in range `[0, 2^32-1]` **Settings Validation Improvements** - Use float comparison for settings validation to handle large values correctly (was using `toInt32()` which truncates) - Use proper `HTTP2_INVALID_SETTING_VALUE_RangeError` error codes for Node.js compatibility **BufferFallbackAllocator** - New allocator that tries a provided buffer first, falls back to heap: - Similar to `std.heap.stackFallback` but accepts external buffer slice - Used with `shared_request_buffer` (16KB threadlocal) for common cases - Falls back to `bun.default_allocator` for large headers ## Test Plan - [x] `bun bd` compiles successfully - [x] Node.js HTTP/2 tests pass: `bun bd test/js/node/test/parallel/test-http2-connect.js` - [x] New regression tests for frame size issues: `bun bd test test/regression/issue/25589.test.ts` - [x] HTTP/2 continuation tests: `bun bd test test/js/node/http2/node-http2-continuation.test.ts` --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
130 lines
3.6 KiB
JSON
130 lines
3.6 KiB
JSON
{
|
|
"name": "test",
|
|
"devDependencies": {
|
|
"@types/react": "18.0.28",
|
|
"@types/react-dom": "18.0.11",
|
|
"@types/supertest": "2.0.12",
|
|
"@types/utf-8-validate": "5.0.0",
|
|
"@types/ws": "8.5.10",
|
|
"@types/puppeteer": "7.0.4"
|
|
},
|
|
"dependencies": {
|
|
"@astrojs/node": "9.1.3",
|
|
"@azure/service-bus": "7.9.4",
|
|
"@bufbuild/protobuf": "2.10.2",
|
|
"@connectrpc/connect": "2.1.1",
|
|
"@connectrpc/connect-node": "2.0.0",
|
|
"@duckdb/node-api": "1.1.3-alpha.7",
|
|
"@electric-sql/pglite": "0.2.17",
|
|
"@fastify/websocket": "11.0.2",
|
|
"@grpc/grpc-js": "1.12.0",
|
|
"@grpc/proto-loader": "0.7.10",
|
|
"@happy-dom/global-registrator": "17.0.3",
|
|
"@napi-rs/canvas": "0.1.65",
|
|
"@nestjs/common": "11.0.3",
|
|
"@nestjs/core": "11.0.3",
|
|
"@prisma/client": "5.8.0",
|
|
"@remix-run/node": "2.16.8",
|
|
"@remix-run/react": "2.10.3",
|
|
"@remix-run/serve": "2.10.3",
|
|
"@resvg/resvg-js": "2.4.1",
|
|
"@swc/core": "1.3.38",
|
|
"@testing-library/jest-dom": "6.6.3",
|
|
"@testing-library/react": "16.1.0",
|
|
"@verdaccio/config": "6.0.0-6-next.76",
|
|
"acorn": "8.15.0",
|
|
"ansi-regex": "6.1.0",
|
|
"astro": "5.5.5",
|
|
"aws-cdk-lib": "2.148.0",
|
|
"axios": "1.6.8",
|
|
"body-parser": "1.20.2",
|
|
"bun-plugin-svelte": "file:../packages/bun-plugin-svelte",
|
|
"bun-plugin-yaml": "0.0.1",
|
|
"comlink": "4.4.1",
|
|
"commander": "12.1.0",
|
|
"detect-libc": "2.0.3",
|
|
"devalue": "5.1.1",
|
|
"duckdb": "1.3.1",
|
|
"es-module-lexer": "1.3.0",
|
|
"esbuild": "0.18.6",
|
|
"express": "4.18.2",
|
|
"fast-glob": "3.3.1",
|
|
"fastify": "5.2.2",
|
|
"filenamify": "6.0.0",
|
|
"happy-dom": "17.0.3",
|
|
"hono": "4.7.2",
|
|
"http2-wrapper": "2.2.1",
|
|
"https-proxy-agent": "7.0.6",
|
|
"iconv-lite": "0.6.3",
|
|
"immutable": "5.1.3",
|
|
"isbot": "5.1.13",
|
|
"jest-extended": "4.0.0",
|
|
"jimp": "1.6.0",
|
|
"jsdom": "25.0.1",
|
|
"jsonwebtoken": "9.0.2",
|
|
"jws": "4.0.0",
|
|
"lodash": "4.17.21",
|
|
"mongodb": "6.0.0",
|
|
"msgpackr-extract": "3.0.2",
|
|
"msw": "2.3.0",
|
|
"mysql2": "3.7.0",
|
|
"node-gyp": "10.0.1",
|
|
"nodemailer": "6.9.3",
|
|
"p-queue": "8.1.0",
|
|
"peechy": "0.4.310",
|
|
"pg": "8.11.1",
|
|
"pg-connection-string": "2.6.1",
|
|
"pg-gateway": "0.3.0-beta.4",
|
|
"pino": "9.4.0",
|
|
"pino-pretty": "11.2.2",
|
|
"postgres": "3.3.5",
|
|
"prisma": "5.1.1",
|
|
"prompts": "2.4.2",
|
|
"proxy": "2.2.0",
|
|
"react": "file:../node_modules/react",
|
|
"react-dom": "18.3.1",
|
|
"reflect-metadata": "0.2.2",
|
|
"rollup": "4.4.1",
|
|
"sass": "1.79.4",
|
|
"sharp": "0.33.0",
|
|
"sinon": "6.0.0",
|
|
"socket.io": "4.7.1",
|
|
"socket.io-adapter": "2.5.5",
|
|
"socket.io-client": "4.7.1",
|
|
"solc": "0.8.28",
|
|
"source-map": "0.7.4",
|
|
"st": "3.0.0",
|
|
"string-width": "7.0.0",
|
|
"strip-ansi": "7.1.0",
|
|
"stripe": "15.4.0",
|
|
"superagent": "10.2.2",
|
|
"supertest": "6.3.3",
|
|
"svelte": "5.20.4",
|
|
"tsyringe": "4.8.0",
|
|
"type-graphql": "2.0.0-rc.2",
|
|
"typeorm": "0.3.20",
|
|
"typescript": "5.9.2",
|
|
"undici": "5.20.0",
|
|
"unzipper": "0.12.3",
|
|
"uuid": "11.1.0",
|
|
"v8-heapsnapshot": "1.3.1",
|
|
"verdaccio": "6.0.0",
|
|
"vitest": "0.32.2",
|
|
"webpack": "5.88.0",
|
|
"webpack-cli": "4.7.2",
|
|
"ws": "8.18.3",
|
|
"xml2js": "0.6.2",
|
|
"yargs": "17.7.2"
|
|
},
|
|
"private": true,
|
|
"scripts": {
|
|
"typecheck": "tsc --noEmit",
|
|
"bd:v": "(bun run --silent --cwd=../ build:debug &> /tmp/bun.debug.build.log || (cat /tmp/bun.debug.build.log && rm -rf /tmp/bun.debug.build.log && exit 1)) && rm -f /tmp/bun.debug.build.log && ../build/debug/bun-debug",
|
|
"bd": "BUN_DEBUG_QUIET_LOGS=1 bun --silent bd:v"
|
|
},
|
|
"resolutions": {
|
|
"react": "../node_modules/react",
|
|
"@types/node": "25.0.0"
|
|
}
|
|
}
|