5 serve(function($client) {
6 /* this might be a proxy connect or a standard request */
7 $request = new http\Message($client, false);
9 if ($request->getHeader("Proxy-Connection")) {
10 $response = new http\Env\Response;
11 $response->send($client);
13 /* soak up the request following the connect */
14 new http\Message($client, false);
17 /* return the initial message as response body */
18 $response = new http\Env\Response;
19 /* avoid OOM with $response->getBody()->append($request); */
20 $request->toStream($response->getBody()->getResource());
21 $response->send($client);