commit c533577383508dac2b21eea8ddd613f0f24c775f Author: Dave Rolek dmr-x@riseup.net Date: Mon Jun 11 01:49:33 2018 +0000
Add slight clarification to variable naming --- stem/descriptor/remote.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/stem/descriptor/remote.py b/stem/descriptor/remote.py index e7baee65..9547b59a 100644 --- a/stem/descriptor/remote.py +++ b/stem/descriptor/remote.py @@ -853,7 +853,7 @@ def _download_from_orport(endpoint, compression, resource): circ.send(RelayCommand.BEGIN_DIR, stream_id = 1) response = b''.join([cell.data for cell in circ.send(RelayCommand.DATA, request, stream_id = 1)]) first_line, data = response.split(b'\r\n', 1) - header_data, data = data.split(b'\r\n\r\n', 1) + header_data, body_data = data.split(b'\r\n\r\n', 1)
if not first_line.startswith(b'HTTP/1.0 2'): raise stem.ProtocolError("Response should begin with HTTP success, but was '%s'" % str_tools._to_unicode(first_line)) @@ -867,7 +867,7 @@ def _download_from_orport(endpoint, compression, resource): key, value = line.split(': ', 1) headers[key] = value
- return _decompress(data, headers.get('Content-Encoding')), headers + return _decompress(body_data, headers.get('Content-Encoding')), headers
def _download_from_dirport(url, compression, timeout):