summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
authorChristian Schneider2016-06-14 17:18:27 +0200
committerChristian Schneider2016-06-14 17:18:27 +0200
commit4b2022b809e37a10261fe49e1fd7ff59716151e8 (patch)
treedce97edb4ff92744da6156320496d22444e3dc89 /it_url.class
parent0c46fb484031f4bbfd69534138bb007e55d1e129 (diff)
downloaditools-4b2022b809e37a10261fe49e1fd7ff59716151e8.tar.gz
itools-4b2022b809e37a10261fe49e1fd7ff59716151e8.tar.bz2
itools-4b2022b809e37a10261fe49e1fd7ff59716151e8.zip
Also set default headers (like X-Ultra-Https) for get_multi
Diffstat (limited to 'it_url.class')
-rw-r--r--it_url.class6
1 files changed, 2 insertions, 4 deletions
diff --git a/it_url.class b/it_url.class
index 2a9694c..11be048 100644
--- a/it_url.class
+++ b/it_url.class
@@ -375,10 +375,8 @@ function get_multi($p=null)
{
$p += array('retries' => 1);
- $p['headers'] = (array)$p['headers'] + array(
- 'User-Agent' => "Mozilla/4.0 (compatible; MSIE 7.0; ITools)",
- 'Accept-Language' => T_lang(),
- );
+ $url = new it_url;
+ $p['headers'] = (array)$p['headers'] + array_diff_key(self::_default_headers($url, $p), ['Host' => null]);
$opts = array(CURLOPT_FOLLOWLOCATION => true) + self::curl_opts($p);