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 2835ad6 commit c23ea4cCopy full SHA for c23ea4c
1 file changed
lib/core/option.py
@@ -96,7 +96,9 @@ def __urllib2Opener():
96
conf.cj = cookielib.LWPCookieJar()
97
handlers.append(urllib2.HTTPCookieProcessor(conf.cj))
98
99
- if conf.keepAlive:
+ # Use Keep-Alive (persistent HTTP connection) only if a proxy is not set
100
+ # Reference: http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html
101
+ if conf.keepAlive and not conf.proxy:
102
handlers.append(keepAliveHandler)
103
104
opener = urllib2.build_opener(*handlers)
0 commit comments