Skip to content

Commit 9d61d34

Browse files
committed
Merge pull request #456 from basho/fixes/lrb/httplib-buffering-gh-277
Use buffering for retrieval of HTTP headers
2 parents 7c56834 + e5b675b commit 9d61d34

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ Contributors
157157
* Daniel Lindsley
158158
* Daniel Néri
159159
* Daniel Reverri
160+
* [David Basden](https://github.com/dbasden)
160161
* David Koblas
161162
* Dmitry Rozhkov
162163
* Eric Florenzano

riak/transports/http/connection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ def _request(self, method, uri, headers={}, body='', stream=False):
3131

3232
try:
3333
self._connection.request(method, uri, body, headers)
34-
response = self._connection.getresponse()
34+
try:
35+
response = self._connection.getresponse(buffering=True)
36+
except TypeError:
37+
response = self._connection.getresponse()
3538

3639
if stream:
3740
# The caller is responsible for fully reading the

0 commit comments

Comments
 (0)