Merge pull request #1304 from tatokis/testing

Fix exception raised due to lack of Content-Type on the Web plugin.
This commit is contained in:
Valentin Lorentz 2017-09-21 00:39:19 +02:00 committed by GitHub
commit a870d02a27

View File

@ -279,6 +279,8 @@ class Web(callbacks.PluginRegexp):
try:
try:
size = fd.headers['Content-Length']
if size is None:
raise KeyError('content-length')
irc.reply(format(_('%u is %S long.'), url, int(size)))
except KeyError:
size = conf.supybot.protocols.http.peekSize()