29 lines
635 B
PHP
Executable File
29 lines
635 B
PHP
Executable File
--TEST--
|
|
swoole_http_server: gzip
|
|
--SKIPIF--
|
|
<?php require __DIR__ . '/../include/skipif.inc'; ?>
|
|
--FILE--
|
|
<?php
|
|
require_once __DIR__ . '/../include/bootstrap.php';
|
|
require_once __DIR__ . '/../include/swoole.inc';
|
|
require_once __DIR__ . '/../include/lib/curl.php';
|
|
|
|
$pm = new ProcessManager;
|
|
$pm->parentFunc = function ($pid)
|
|
{
|
|
$data = curlGet("http://127.0.0.1:9501/gzip");
|
|
assert(md5_file(__DIR__ . '/../../README.md') == md5($data));
|
|
swoole_process::kill($pid);
|
|
};
|
|
|
|
$pm->childFunc = function () use ($pm)
|
|
{
|
|
include __DIR__ . "/../include/api/http_server.php";
|
|
};
|
|
|
|
$pm->childFirst();
|
|
$pm->run();
|
|
?>
|
|
--EXPECTREGEX--
|
|
|