Fixed
-
A read timeout was reported as a broken connection on PHP 8.1 and newer.
fread()returns
falsethere where earlier versions returned an empty string, and the client took that for a
dead stream — so the default framing mode, which ends a response on a quiet interval, threw
ConnectionException: Request failed, broken connection.on every request against a real
socket. A timeout is now told apart from a broken stream by
stream_get_meta_data()['timed_out'].Present since 1.0 and dormant until PHP 8.1 changed the return value. The suite missed it
because it drives the client through aphp://stream wrapper, whose read cannot return
false; a socket-pair test now covers the real thing.