summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Gass2013-07-12 15:56:42 +0000
committerNathan Gass2013-07-12 15:56:42 +0000
commitc0c241cddb70df0388558b459e1b9cee70ad049a (patch)
treec53dad50d007f72ddaf49e10b6a4bd03874e4b6b
parentdd6467c92d664acba3d104f0130116a95f4d3fa6 (diff)
downloaditools-c0c241cddb70df0388558b459e1b9cee70ad049a.tar.gz
itools-c0c241cddb70df0388558b459e1b9cee70ad049a.tar.bz2
itools-c0c241cddb70df0388558b459e1b9cee70ad049a.zip
only load it_text.class if no Accept-Language header is given
-rw-r--r--it_url.class4
1 files changed, 3 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class
index 3caa6cb..2ec329e 100644
--- a/it_url.class
+++ b/it_url.class
@@ -297,9 +297,11 @@ function request($p=array())
$p['headers'] = (array)$p['headers'] + array(
'Host' => $url->realhostname . ($url->port != 80 ? ":" . $url->port : ''),
'User-Agent' => "Mozilla/4.0 (compatible; MSIE 7.0; ITools)",
- 'Accept-Language' => T_lang(),
);
+ if (!$p['headers']['Accept-Language'])
+ $p['headers']['Accept-Language'] = T_lang();
+
if (is_int($p['filemtime']))
$p['headers']['If-Modified-Since'] = date("r", $p['filemtime']);