Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6716cf commit dbce417Copy full SHA for dbce417
1 file changed
lib/request/connect.py
@@ -126,9 +126,9 @@ def __retryProxy(**kwargs):
126
def __connReadProxy(conn):
127
retVal = ""
128
129
- if not kb.dnsMode:
130
- if conn.headers.getheader(HTTPHEADER.CONTENT_ENCODING, "").lower() in ("gzip", "deflate")\
131
- or "text" not in conn.headers.getheader(HTTPHEADER.CONTENT_TYPE, "").lower():
+ if not kb.dnsMode and conn:
+ if conn.headers and (conn.headers.getheader(HTTPHEADER.CONTENT_ENCODING, "").lower() in ("gzip", "deflate")\
+ or "text" not in conn.headers.getheader(HTTPHEADER.CONTENT_TYPE, "").lower()):
132
retVal = conn.read()
133
else:
134
while True:
0 commit comments