6 serve(function($client) {
7 $request = new http\Message($client, false);
9 if ($request->getHeader("Expect") === "100-continue") {
10 $response = new http\Env\Response;
11 $response->setEnvRequest($request);
12 $response->setResponseCode(100);
13 $response->send($client);
16 /* return the initial message as response body */
17 $response = new http\Env\Response;
18 /* avoid OOM with $response->getBody()->append($request); */
19 dump_message($response->getBody()->getResource(), $request);
20 $response->send($client);