mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
## Summary - Fixes silent 401 Unauthorized errors when using proxies with long passwords (e.g., JWT tokens > 4096 chars) - Bun was silently dropping proxy passwords exceeding 4095 characters, falling through to code that only encoded the username ## Changes - Added `PercentEncoding.decodeWithFallback` which uses a 4KB stack buffer for the common case and falls back to heap allocation only for larger inputs - Updated proxy auth encoding in `AsyncHTTP.zig` to use the new fallback method ## Test plan - [x] Added test case that verifies passwords > 4096 chars are handled correctly - [x] Test fails with system bun (v1.3.3), passes with this fix - [x] All 29 proxy tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude <noreply@anthropic.com>