我在php7.4的ubuntu机器上安装了curl 7.58和guzzle 7.3(来源:7008573)。
当我用
运行请求时$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://mockbin.org/bin/e61ded3e-d2e1-4071-8c27-9c35f1d7cb72?foo=bar&foo=baz',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HEADER => true,
));
$response = curl_exec($curl);
// Then, after your curl_exec call:
$header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
$header = substr($response, 0, $header_size);
$body = substr($response, $header_size);
curl_close($curl);
echo $header;
我可以看到整个延续令牌在那里。然而,当我使用guzzle运行此命令时,您可以看到我得到的结果:
>>> $client = new GuzzleHttpClient();
=> GuzzleHttpClient {#4501}
>>> $res = $client->head('http://mockbin.org/bin/e61ded3e-d2e1-4071-8c27-9c35f1d7cb72?foo=bar&foo=baz');
=> GuzzleHttpPsr7Response {#4524}
>>> $res->getHeaders();
=> [
"Date" => [
"Tue, 14 Sep 2021 14:52:30 GMT",
],
"Content-Type" => [
"text/html; charset=utf-8",
],
"Connection" => [
"keep-alive",
],
"continuation" => [
"eyJUb3RhbENvdW50IjpudWxsLCJUb2tlbiI6Ilt7XCJ0b2tlblwiOlwiK1JJRDp+enpaakFMZlpzOXBYNHdFQUFBQUFBQT09I1JUOjEjVFJDOjEwMCNJU1Y6MiNJRU86NjU1NTEjUUNGOjQjRlBQOkFnSUhBTklCQndBYUFGVWpnR0FoWUFBQ0YwZ01BSUVPUkFJS2lnS0FjZ0lBUWdFQUNBQVFBUEVPQUF1UkVRREFVUXBpQVpxRjhZUUpBQmdBQm9IN2phcURQNGRKaFNTQTZvRFdnTldJVllXS2hkK0lDZ0FNQURhbXVZUDVqVUNCT1lVYWdBc0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%3D"}],"group":"cf-nel","max_age":604800}",
],
"NEL" => [
"{"success_fraction":0,"report_to":"cf-nel","max_age":604800}",
],
"Server" => [
"cloudflare",
],
"CF-RAY" => [
"68ea7081aba00c01-AMS",
],
"alt-svc" => [
"h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-28=":443"; ma=86400, h3-27=":443"; ma=86400",
],
]
可以看到,延续令牌被截断为精确的16kb。(16384个字符)。
在写这篇文章之前,我已经检查了很多东西,但是,我似乎不能弄清楚。我看不出任何会导致这个问题的配置。有什么默认值需要更改吗?
这是curl 7.58中的一个bug。它已在7.59版中修复。curl应该支持最大头大小CURL_MAX_HTTP_HEADER (100kB)。请参阅本期和此邮件链。
在此bug修复之前,curl会在将超过CURL_MAX_WRITE_SIZE (16kB)的头传递给header回调函数(doc)之前意外地切断头。Guzzle受到影响,因为它内部使用CURLOPT_HEADERFUNCTION (Guzzle源代码,PHP文档)。
解决方案是升级系统的curl安装,这可能不是微不足道的。