{ if ('chunked' ===
substr($options['normalized_headers'
]['transfer-encoding'
][0
] ?? '', \
strlen('Transfer-Encoding: '
))) { unset($options['normalized_headers'
]['transfer-encoding'
]);
$options['body'
] = self::
dechunk($options['body'
]);
} $options['normalized_headers'
]['content-length'
] =
[substr_replace($h ?: 'Content-Length: ', \
strlen($options['body'
]), 16
)];
} } if (isset($options['peer_fingerprint'
])) { $options['peer_fingerprint'
] = self::
normalizePeerFingerprint($options['peer_fingerprint'
]);
} if (isset($options['crypto_method'
]) && !\
in_array($options['crypto_method'
],
[ \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT,
\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT,
\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT,
\STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT,
], true
)) { throw new InvalidArgumentException('Option "crypto_method" must be one of "STREAM_CRYPTO_METHOD_TLSv1_*_CLIENT".'
);
}