From 99c872651a08e864a5de6b2d2d98dbb19854b157 Mon Sep 17 00:00:00 2001 From: akasima Date: Fri, 11 Jul 2014 10:47:50 +0900 Subject: [PATCH] =?UTF-8?q?#839=20getRemoteResource=20=EC=97=90=EC=84=9C?= =?UTF-8?q?=20=EC=97=B0=EA=B2=B0=20=EC=84=A4=EC=A0=95=EC=9D=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/file/FileHandler.class.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/classes/file/FileHandler.class.php b/classes/file/FileHandler.class.php index 29d94eb7f..db1a82f62 100644 --- a/classes/file/FileHandler.class.php +++ b/classes/file/FileHandler.class.php @@ -515,7 +515,7 @@ class FileHandler * @param string $post_data Request arguments array for POST method * @return string If success, the content of the target file. Otherwise: none */ - function getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array()) + function getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array(), $request_config = array()) { try { @@ -533,6 +533,15 @@ class FileHandler else { $oRequest = new HTTP_Request($url); + + if(count($request_config) && method_exists($oRequest, 'setConfig')) + { + foreach($request_config as $key=>$val) + { + $oRequest->setConfig($key, $val); + } + } + if(count($headers) > 0) { foreach($headers as $key => $val)