From 8d5108b142dd8d9de27559ee8364967b13f2b62a Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 21 Aug 2011 06:58:34 -0400 Subject: [PATCH 1/3] faq --- docs/community/faq.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/community/faq.rst b/docs/community/faq.rst index 7b49725d..b0921956 100644 --- a/docs/community/faq.rst +++ b/docs/community/faq.rst @@ -3,13 +3,16 @@ Frequently Asked Questions ========================== -This part of the documentation covers common questions about Requests. +This part of the documentation answers common questions about Requests. Encoded Data? ------------- -Requests automatically decompresses GZip'ed responses, and decodes -response conten tinto unicode when encoding information is available. +Requests automatically decompresses gzip-encoded responses, and does +it's best to decodes response content to unicode when possible. + +You can get direct access to the raw reasponse (and even the socket), +if needed as well. Custom User-Agents? From 1143d4237f5e433a6181e6f7e1abcb1e7031120a Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 21 Aug 2011 06:59:13 -0400 Subject: [PATCH 2/3] AUTHORS += 'Den Shabalin' --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index f79dd801..76c24373 100644 --- a/AUTHORS +++ b/AUTHORS @@ -41,3 +41,4 @@ Patches and Suggestions - Den Shabalin - Alejandro Giacometti - Rick Mak +- Den Shabalin \ No newline at end of file From c8110222a532821d27b0ade3ebdd7d0cb9545f80 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 21 Aug 2011 07:01:29 -0400 Subject: [PATCH 3/3] no need to set content avoids 2.5 workaround --- requests/models.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/requests/models.py b/requests/models.py index 03b853c8..262a564d 100644 --- a/requests/models.py +++ b/requests/models.py @@ -442,7 +442,7 @@ class Response(object): def content(self): """Content of the response, in bytes or unicode (if available).""" - + if self._content is not None: return self._content @@ -463,11 +463,6 @@ class Response(object): return self._content - @content.setter - def content(self, value): - self._content = value - - def raise_for_status(self): """Raises stored :class:`HTTPError` or :class:`URLError`, if one occured.""" if self.error: