当前位置: 首页 > 后端技术 > PHP

Swoolev4.6.4发布,bug修复版

时间:2023-03-30 02:20:27 PHP

v4.6.4版本主要是一个错误修复版本,没有向后不兼容的更改。新增Swoole\Coroutine\Http\get、Swoole\Coroutine\Http\post和Swoole\Coroutine\Http\request函数,此操作是为了方便使用Coroutine\Http\ClientusefunctionSwoole\Coroutine\go;usefunctionSwoole\Coroutine\run;使用函数Swoole\Coroutine\Http\get;使用函数Swoole\Coroutine\Http\post;使用函数Swoole\Coroutine\Http\request;run(function(){go(function(){$data=get('http://httpbin.org/get?hello=world');$body=json_decode($data->getBody());assert($body->headers->Host==='httpbin.org');assert($body->args->hello==='world');});go(function(){$random_data=base64_encode(random_bytes(128));$data=post('http://httpbin.org/post?hello=world',['random_data'=>$random_data]);$body=json_decode($data->getBody());assert($body->headers->Host==='httpbin.org');assert($body->args->hello==='world');作为sert($body->form->random_data===$random_data);});});以下是完整的更新日志:NewAPIAddedCoroutine\Http::request,Coroutine\Http::post,Coroutine\Http::getfunction(swoole/library#97)(@matyhtf)增强对ARM64构建的支持(#4057)(@devnexen)支持在SwooleTCPserver中设置open_http_protocol(#4063)(@matyhtf)支持sslClientonlysetcertificate(91704ac)(@matyhtf)支持FreeBSD的tcp_defer_accept选项(#4049)(@devnexen)修复使用Coroutine\Http\Client时缺少代理授权的问题(edc0552)(@matyhtf)修复Swoole\Table内存分配问题(3e7770f)(@matyhtf)修复Coroutine\Http2\Client并发连接崩溃问题(630536d)(@matyhtf)修复DTLS的enable_ssl_encrypt问题(842733b)(@matyhtf)修复Coroutine\Barrier的内存泄露问题(swoole/library#94)(@Appla)(@FMiS)修复CURLOPT_PORT和CURLOPT_URL顺序导致的offset错误(swoole/library#96)(@sy-records)修复Table::get($key,$field)whenfieldsErrorwhenthetypeisfloat(08ea20c)(@matyhtf)修复Swoole\Table内存泄漏(d78ca8c)(@matyhtf)