mamaduckmaster / httplib2

Automatically exported from code.google.com/p/httplib2
0 stars 0 forks source link

ValueError on malformated cache entries #214

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Get the cachedir to contain a invalid entry 
2. A call to the given resource will result in a crash like:
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1346, in request
    info, content = cached_value.split('\r\n\r\n', 1)
ValueError: need more than 1 value to unpack
3. No data is returned

What is the expected output? What do you see instead?

It should be tolerant against this kind of failure.

What version of the product are you using? On what operating system?

0.7.4

Please provide any additional information below.

See the attached patch for a trivial fix.

Original issue reported on code.google.com by michael....@gmail.com on 28 Jun 2012 at 11:49

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 403deb2f51e7.

Original comment by joe.gregorio@gmail.com on 28 Aug 2012 at 4:20