Swoole PHP 4.6.7 released: bug fixes and enhancements

Swoole v4.6.7 is released with multiple enhancements and bug fixes.

The bug Http\Response::end() always returns true is fixed.

The limitation of output_buffer_size is removed and default value output_buffer_size is changed from 2MB to UINT_MAX.

In previous versions due to this limitation, $response->end() may return the following errors:

<?php
use Swoole\Http\Server;
use Swoole\Http\Request;
use Swoole\Http\Response;

$http = new Server('127.0.0.1', 9501);

$http->set([
    'http_compression' => false,
    'buffer_output_size' => 128 * 1024,
]);

$http->on('request', function (Request $request, Response $response) {
    assert($response->end(str_repeat('A', 256 * 1024)) === false);
    assert(swoole_last_error() === SWOOLE_ERROR_DATA_LENGTH_TOO_LARGE);
});

$http->start();
WARNING finish (ERRNO 1203): The length of data [262144] exceeds the output buffer size[131072], please use the sendfile, chunked transfer mode or adjust the output_buffer_size

The previous solution was: use sendfile , write or adjust output_buffer_size.

From this version, the default value of output_buffer_size is increased to the maximum value of unsigned INT (UINT_MAX).

List of changes in v4.6.7

Enhancement
---
* Supported call Process::signal() in Manager process and Worker process (#4190) (@matyhtf)

Fixed
---
* Fixed signal cannot be registered repeatedly (#4170) (@matyhtf)
* Fixed build on OpenBSD/NetBSD (#4188) (#4194) (@devnexen)
* Fixed special case OnClose event missing while listening for writable events (#4204) (@matyhtf)
* Fixed native curl with Symfony HttpClient (#4208) (@matyhtf)
* Fixed Http\Response::end() always return true (swoole/[email protected]) (@matyhtf)
* Fixed PDOException generated by PDOStatementProxy (swoole/library#104) (@twose)

Kernel
---
* Refactored worker buffer, add msg id for the event data (#4163) (@matyhtf)
* Changed the log level of "Request Entity Too Large" to warning (#4175) (@sy-records)
* Deleted inet_ntoa and inet_aton calls (#4199) (@remicollet)
* Adjusted output_buffer_size value to UINT_MAX (swoole/[email protected]) (@matyhtf)

You can upgrade to Swoole v4.6.7 now:

pecl install swoole