From beb002b6487e9d636cf7483eae4f727621cbcabc Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Fri, 15 Nov 2013 03:44:52 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=BACurl=E7=B1=BB=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=A4=B4=E4=BF=A1=E6=81=AF=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/module/Helpers/Curl.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/application/module/Helpers/Curl.php b/application/module/Helpers/Curl.php index bc819575..dea71661 100644 --- a/application/module/Helpers/Curl.php +++ b/application/module/Helpers/Curl.php @@ -16,6 +16,8 @@ class Curl 'verifyssl' => true, ), $options); } + + public $H; /** * Send a request to the server, receive a response @@ -69,6 +71,11 @@ class Curl } else { $headers[] = 'Content-Length: 0'; } + + if(!empty($this->H) && is_array($this->H) && count($this->H) > 0) + { + $headers = array_merge($headers,$this->H); + } $this->debug('send '.$httpMethod.' request: '.$url);