From e4fbf9693ae1e972ef91b98c5c636cb139030da1 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Wed, 15 Jul 2026 10:45:01 +0000 Subject: [PATCH] =?UTF-8?q?fix(http):=20Ihttp=20=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E5=A4=B4=E8=A7=A3=E6=9E=90=E5=89=8D=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=20headers=20=E6=95=B0=E7=BB=84=EF=BC=8C=E6=B6=88=E9=99=A4?= =?UTF-8?q?=E6=9C=AA=E5=AE=9A=E4=B9=89=E7=B4=A2=E5=BC=95=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Module/Ihttp.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Module/Ihttp.php b/app/Module/Ihttp.php index 2fb65fab2..cfe96aff7 100755 --- a/app/Module/Ihttp.php +++ b/app/Module/Ihttp.php @@ -196,13 +196,14 @@ class Ihttp $rlt['status'] = $matches[3]; $rlt['responseline'] = $split2[0]; $header = explode("\r\n", $split2[1]); + $rlt['headers'] = []; $isgzip = false; $ischunk = false; foreach ($header as $v) { $row = explode(':', $v); $key = trim($row[0]); $value = trim(substr($v, strlen($row[0]) + 1)); - if (is_array($rlt['headers'][$key])) { + if (isset($rlt['headers'][$key]) && is_array($rlt['headers'][$key])) { $rlt['headers'][$key][] = $value; } elseif (!empty($rlt['headers'][$key])) { $temp = $rlt['headers'][$key];