Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c40dded

Browse files
committed
Fix for an Issue #250
1 parent 93e071f commit c40dded

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/request/connect.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,9 @@ def __connReadProxy(conn):
136136
retVal = ""
137137

138138
if not kb.dnsMode and conn:
139-
if conn.headers and (conn.headers.getheader(HTTPHEADER.CONTENT_ENCODING, "").lower() in ("gzip", "deflate")\
140-
or "text" not in conn.headers.getheader(HTTPHEADER.CONTENT_TYPE, "").lower()):
139+
headers = conn.info()
140+
if headers and (headers.getheader(HTTPHEADER.CONTENT_ENCODING, "").lower() in ("gzip", "deflate")\
141+
or "text" not in headers.getheader(HTTPHEADER.CONTENT_TYPE, "").lower()):
141142
retVal = conn.read()
142143
else:
143144
while True:

0 commit comments

Comments
 (0)