Fixed bug in handling of pages less than maxSize but with no Content-length header.

This commit is contained in:
Jeremy Fincher 2003-12-03 20:47:33 +00:00
parent 39ab2b78bf
commit b2f98258a6

View File

@ -120,7 +120,7 @@ class Http(callbacks.Privmsg):
except KeyError:
s = fd.read(self.maxSize)
if len(s) != self.maxSize:
irc.reply(msg, '%s is %s bytes long.' % (url, size))
irc.reply(msg, '%s is %s bytes long.' % (url, len(s)))
else:
irc.reply(msg, 'The server didn\'t tell me how long %s is '
'but it\'s longer than %s bytes.' %