Show More
@@ -129,7 +129,7 b' def _gen_sendfile(orgsend):' | |||||
129 | orgsend(self, data) |
|
129 | orgsend(self, data) | |
130 | return _sendfile |
|
130 | return _sendfile | |
131 |
|
131 | |||
132 | has_https = hasattr(urllib2, 'HTTPSHandler') |
|
132 | has_https = util.safehasattr(urllib2, 'HTTPSHandler') | |
133 | if has_https: |
|
133 | if has_https: | |
134 | try: |
|
134 | try: | |
135 | _create_connection = socket.create_connection |
|
135 | _create_connection = socket.create_connection | |
@@ -186,8 +186,8 b' class httpconnection(keepalive.HTTPConne' | |||||
186 | # general transaction handler to support different ways to handle |
|
186 | # general transaction handler to support different ways to handle | |
187 | # HTTPS proxying before and after Python 2.6.3. |
|
187 | # HTTPS proxying before and after Python 2.6.3. | |
188 | def _generic_start_transaction(handler, h, req): |
|
188 | def _generic_start_transaction(handler, h, req): | |
189 | if hasattr(req, '_tunnel_host') and req._tunnel_host: |
|
189 | tunnel_host = getattr(req, '_tunnel_host', None) | |
190 | tunnel_host = req._tunnel_host |
|
190 | if tunnel_host: | |
191 | if tunnel_host[:7] not in ['http://', 'https:/']: |
|
191 | if tunnel_host[:7] not in ['http://', 'https:/']: | |
192 | tunnel_host = 'https://' + tunnel_host |
|
192 | tunnel_host = 'https://' + tunnel_host | |
193 | new_tunnel = True |
|
193 | new_tunnel = True |
General Comments 0
You need to be logged in to leave comments.
Login now