feat(ext/node): rewrite _http_common.ts to match Node.js structure
Rewrite _http_common.ts as a close port of Node.js lib/_http_common.js.
Now includes:
- Parser pool (FreeList of 1000 HTTPParser instances)
- parserOnHeaders: accumulates fragmented/trailing headers
- parserOnHeadersComplete: creates IncomingMessage, sets up headers,
calls parser.onIncoming()
- parserOnBody: pushes body chunks to IncomingMessage stream with
backpressure (readStop on false return from push)
- parserOnMessageComplete: sets complete flag, flushes trailing
headers, pushes null to end stream
- freeParser/cleanParser: parser lifecycle management
- prepareError/isLenient: error formatting and lenient mode
- New exports: parsers, freeParser, prepareError, isLenient,
kIncomingMessage, kSkipPendingData, kOnHeaders, kOnHeadersComplete,
kOnBody, kOnMessageComplete, readStart, readStop
This provides all the infrastructure needed by _http_client.js and
_http_server.js to use the native llhttp parser.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>