All, I spoke with ry and substack about this issue when I was in San Francisco last month: https://github.com/joyent/node/issues/2612. If I remember correctly, it requires small changes to http-parser and the node wrapper. I don't know this code base at all so I'm looking for someone to help implement it.
The purpose here is to make HTTP proxying much simpler. The proxy logic in node-http-proxy right now is implemented through an http.Server instance. This fix would allow it to be implemented through a net.Server instance using this logic: 1. Create a net server. (for each connection) 2. Buffer chunks and execute them against an HTTPParser instance. 3. Slice the HTTP headers from first one (or two) chunks, edit them, and serialize them. 4. Flush the buffer to the outgoing reverse proxy request. It is impossible to do (3) properly without this fix. I have a branch of node-http-proxy which performs a naive slice looking for the first occurance of `\r\n\r\n`. https://github.com/nodejitsu/node-http-proxy/blob/experimental/lib/balancing-proxy.js#L257-261. After some initial tests this approach is too naive and won't work in production. Any help here would be fantastic. Thanks, Charlie
