Restrict disable Feature Negotiation

This commit is contained in:
2021-01-25 03:27:53 +03:00
parent da4331127b
commit 0ba02103ef
2 changed files with 5 additions and 3 deletions

View File

@@ -81,6 +81,8 @@ final class ClientConfig implements JsonSerializable
// A string identifying the agent for this client in the spirit of HTTP.
public string $userAgent = '',
) {
$this->featureNegotiation = true; // Always enabled
if ('' === $this->hostname) {
$this->hostname = (static fn (mixed $h): string => \is_string($h) ? $h : '')(gethostname());
}