APP端發(fā)起GET請求時(shí),POST并無處理,導(dǎo)致接收的POST參數(shù)并不是數(shù)組,在Http.php原代碼部分: $_REQUEST = array_merge($_GET, $_POST, $_REQUEST); 合并3個(gè)數(shù)組就存在類型警告問題: PHP Warning: array_merge(): Argument #2 is not an array in /Workerman/Protocols/Http.p...
之前業(yè)務(wù)是建立在3.4.0版本上,客戶端采用POST發(fā)送JSON數(shù)據(jù),接收正常,現(xiàn)更換為3.4.2版本后,業(yè)務(wù)代碼不變,但打印data數(shù)據(jù)段,發(fā)現(xiàn)content-type為application/json時(shí),post節(jié)點(diǎn)一直為空,為application/x-www-form-urlencoded時(shí)才會(huì)有數(shù)據(jù)。 對比兩個(gè)版本中的Http.php,發(fā)現(xiàn)3.4.2改動(dòng)了一處。 原3.4.0版本: // Parse $_P...