[fixes #1023] Set self._ended to true once response has ended
Merge pull request #1025 from mridgway/gzipFix

[fixes #1023] Set self._ended to true once response has ended