diff --git a/plugins/Web/plugin.py b/plugins/Web/plugin.py index aab7885c5..ebad498c9 100644 --- a/plugins/Web/plugin.py +++ b/plugins/Web/plugin.py @@ -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()