mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
1. Remove unused #include <stdio.h> from socket.c
- stdio.h was added for debug logging but is no longer needed
2. Fix SSL branch in uws_app_accept()
- SSL/TLS socket acceptance now properly rejects with -1
- Added comment explaining proper implementation would require
us_socket_wrap_with_tls() + us_socket_open() for TLS handshake
- Avoids unsafe construction of TLS HttpResponseData on non-TLS socket
3. Add #include <new> for placement new
- Required for placement new syntax used in HttpResponseData initialization
4. Update accept() documentation with ownership semantics
- Clarifies that app takes FD ownership on success
- Caller retains ownership and must close FD on failure
- Notes that SSL/TLS is not currently supported
5. Optimize test buffer allocations
- Large POST body: Use Buffer.alloc(10000, 0x78).toString() instead of "x".repeat(10000)
- Binary upload: Use Buffer.allocUnsafe(1000) and i & 0xff for faster allocation
All tests still pass (7 pass, 279 expect() calls).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>