kennethreitz/requests — pull request #470 by fawek (2012-03-05 17:49:55+00:00)
Title: Fix and considerably simplify the iter_lines() function

1. Do not use rstrip() as this would also throw away meaningful whitespaces
2. Avoid assuming what striplines() considers a line break terminator, the list of those is quite long in Unicode.
3. Add tests for the above edge cases.

This should look much better now. The only question I have is whether iter_content() could yield an empty chunk? generate()/generate_chunked() never do but the decoder might. In that case, I'll need to amend this.