Yay! I finally managed to get some performance out of this module by allowing it to handle persistent connections in HTTP/1.1. This is all in version 0.07!
Sometimes there's no other way than cut'n'paste.
I did in fact paint myself in a corner by doing only what was rational: using the callback version of LWP::UserAgent simple_request() method. This enables the proxy to begin sending a response while it's still busy receiving it.
Well, HTTP::Daemon supports persistent connections, but the code that does this is in send_response() (which I didn't use at first...) works well with persistent connections when used with either a full response (which I cannot have, since I use a callback with LWP::UA) or a... callback as the content() of the HTTP::Response to send.
So I simply cut the perfect code for the task out of HTTP::Daemon, and pasted it in the callback that HTTP::Proxy gives to LWP::UA.
By now, I begin to find my way both in RFC 2616 and libwww-perl's source code.
If only I could make this work under Windows...