internetarchive / liveweb

Liveweb proxy of the Wayback Machine project
https://web.archive.org/
44 stars 13 forks source link

Connection interrupted exception uncaught #25

Closed nibrahim closed 12 years ago

nibrahim commented 12 years ago

When connecting to http://frglee.com/wp-content/uploads/2007/02/xav4lee.jpg

a traceback like this

  Traceback (most recent call last):
    File "./liveweb/webapp.py", line 42, in __iter__
      size, fileobj = arc_proxy.get(self.url)
    File "./liveweb/arc_proxy.py", line 122, in get
      return live_fetch(url)
    File "./liveweb/arc_proxy.py", line 166, in live_fetch
      response = conn.getresponse()
    File "/usr/lib/python2.7/httplib.py", line 1030, in getresponse
      response.begin()
    File "/usr/lib/python2.7/httplib.py", line 407, in begin
      version, status, reason = self._read_status()
    File "/usr/lib/python2.7/httplib.py", line 365, in _read_status
      line = self.fp.readline()
    File "./liveweb/filetools.py", line 40, in readline
      text = self.fileobj.readline(*a, **kw)
    File "/usr/lib/python2.7/socket.py", line 430, in readline
      data = recv(1)
  error: [Errno 104] Connection reset by peer

appears. This needs to be caught and properly handled.