shazow/urllib3 — pull request #198 by Lukasa (2013-06-08 18:48:04+00:00)
Title: Initial pass at stream method

As you requested in #186, this is my first pass at the `.stream()` method we talked about. Obviously this isn't final code, and has no tests: it was me considering ideas.

The problem here is that it assumes knowledge of the underlying file object. Right now we only call `self.fp.read()` and `self.fp.close()`, which means `fp` can be any file-like object. This method uses the knowledge of `httplib` to work out when we've actually exhausted the file-like object, which makes it harder to test.

Let me know.