summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
authorChristian Schneider2020-04-30 15:32:32 +0200
committerChristian Schneider2020-04-30 15:32:32 +0200
commit669c3f2db0566aba235e97ba4b544dd602a72dee (patch)
tree14a0b612c3a09fdc6350eff8915ce2e6bc0ef418 /it_url.class
parent5226a0149d1d49aef506535c8d27b00981dcd115 (diff)
downloaditools-669c3f2db0566aba235e97ba4b544dd602a72dee.tar.gz
itools-669c3f2db0566aba235e97ba4b544dd602a72dee.tar.bz2
itools-669c3f2db0566aba235e97ba4b544dd602a72dee.zip
Use user's Accept-Language (mapped to languages we know) instead of currently active language to preserve language overrides in subrequests
Diffstat (limited to 'it_url.class')
-rw-r--r--it_url.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class
index 3537b3f..2df0aaa 100644
--- a/it_url.class
+++ b/it_url.class
@@ -168,7 +168,7 @@ static function _default_headers($url, $p)
$headers = [
'Host' => $url->realhostname . $url->explicitport,
'User-Agent' => "Mozilla/5.0 (compatible; MSIE 9.0; ITools)",
- 'Accept-Language' => $p['headers']['Accept-Language'] ?: T_lang(), # can prevent loading of it_text
+ 'Accept-Language' => $p['headers']['Accept-Language'] ?: T_defaultlang(), # can prevent loading of it_text
'Referer' => it::match('([-\w]+\.\w+)$', $url->hostname) == it::match('([-\w]+\.\w+)$', $_SERVER['HTTP_HOST']) ? it_url::absolute(U($_GET)) : null,
'X-Ultra-Https' => $_SERVER['HTTPS'],
];