--TEST-- Bug #73037 SoapServer reports Bad Request when gzipped, var 0 --EXTENSIONS-- soap zlib --SKIPIF-- --FILE-- Empire Burlesque Bob Dylan USA Columbia 10.90 1985 "; $begin = ''; $end = ''; $min = strlen($begin) + strlen($piece) + strlen($end); $max = $max < $min ? $min : $max; $data = $begin; $data .= $piece; while (strlen($data) + strlen($end) < $max) { /* Randomize a bit, taking gzip in account. */ $tmp = str_replace( array( "Empire Burlesque", "Bob Dylan", ), array( md5(uniqid()), sha1(uniqid()), ), $piece ); if (strlen($begin) + strlen($tmp) + strlen($end) > $max) { break; } $data .= $tmp; } $data .= $end; return $data; } $router = "bug73037_server.php"; $args = ["-d", "extension_dir=" . ini_get("extension_dir"), "-d", "extension=" . (substr(PHP_OS, 0, 3) == "WIN" ? "php_" : "") . "soap." . PHP_SHLIB_SUFFIX]; if (php_ini_loaded_file()) { // Necessary such that it works from a development directory in which case extension_dir might not be the real extension dir $args[] = "-c"; $args[] = php_ini_loaded_file(); } $code = <<<'PHP' $s = new SoapServer(NULL, array('uri' => 'http://here')); $s->setObject(new stdclass()); $s->handle(); PHP; php_cli_server_start($code, $router, $args); foreach (array(1024-1, 1024*8-3, 1024*9+1, 1024*16-1, 1024*32-5, 1024*64+3, 1024*128-7) as $k => $i) { echo "Iteration $k\n\n"; /* with and without compression */ foreach (array(false, true) as $b) { $data = get_data($i); if ($b) { $data = gzencode($data); } $len = strlen($data); //echo "len=$len\n"; $hdrs = <<"); if (false === $pos) { echo $out; goto cleanup; } $pos0 = $pos + strlen(""); $pos = strpos($out, ""); if (false === $pos) { echo $out; goto cleanup; } $len = $pos - $pos0; echo substr($out, $pos0, $len); } cleanup: fclose($fp); echo "\n\n"; } } ?> --EXPECT-- Iteration 0 Function 'CATALOG' doesn't exist Function 'CATALOG' doesn't exist Iteration 1 Function 'CATALOG' doesn't exist Function 'CATALOG' doesn't exist Iteration 2 Function 'CATALOG' doesn't exist Function 'CATALOG' doesn't exist Iteration 3 Function 'CATALOG' doesn't exist Function 'CATALOG' doesn't exist Iteration 4 Function 'CATALOG' doesn't exist Function 'CATALOG' doesn't exist Iteration 5 Function 'CATALOG' doesn't exist Function 'CATALOG' doesn't exist Iteration 6 Function 'CATALOG' doesn't exist Function 'CATALOG' doesn't exist