11 include "helper/server.inc";
15 class Observer implements SplObserver
17 #[ReturnTypeWillChange]
18 function update(SplSubject $client, http\Client\Request $request = null, StdClass $progress = null) {
20 /* fence against buggy infof() calls in some curl versions */
21 $compare = $client->getProgressInfo($request);
22 if ($progress->info !== "prepare" && $compare && $compare != $progress) {
23 var_dump($progress, $compare);
28 server("proxy.inc", function($port, $stdin, $stdout, $stderr) {
29 foreach (http\Client::getAvailableDrivers() as $driver) {
30 $client = new http\Client($driver);
31 $client->attach(new Observer);
32 $client->enqueue(new http\Client\Request("GET", "http://localhost:$port/"));