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