mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Call super().setValue() before defaultHttpHeaders.
To prevent infinite recursion on startup, because defaultHttpHeaders gets the value; which is unset, so 'registry._lastModified > self._lastModified' is True, so .set() is called, so .setValue() is called again.
This commit is contained in:
parent
c457b52067
commit
895881e66e
@ -1318,14 +1318,15 @@ class HttpRequestLanguage(registry.String):
|
||||
"""Must be a valid HTTP Accept-Language value."""
|
||||
__slots__ = ()
|
||||
def setValue(self, v):
|
||||
utils.web.defaultHeaders = defaultHttpHeaders(None, None)
|
||||
super(HttpRequestLanguage, self).setValue(v)
|
||||
utils.web.defaultHeaders = defaultHttpHeaders(None, None)
|
||||
|
||||
registerChannelValue(supybot.protocols.http, 'requestLanguage',
|
||||
HttpRequestLanguage('', _("""If set, the Accept-Language HTTP header will be set to this
|
||||
value for requests. Useful for overriding the auto-detected language based on
|
||||
the server's location.""")))
|
||||
|
||||
|
||||
###
|
||||
# supybot.protocols.ssl
|
||||
###
|
||||
|
Loading…
Reference in New Issue
Block a user