This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2015年02月03日 09:05 by aristotel, last changed 2022年04月11日 14:58 by admin.
| Messages (1) | |||
|---|---|---|---|
| msg235322 - (view) | Author: Valeriy Osipov (aristotel) | Date: 2015年02月03日 09:05 | |
Environment: OS Windows 8, Fiddler is running
To reproduce the issue launch this code snippet:
import requests
import datetime
import urllib
print datetime.datetime.now()
#print requests.get('http://torgi.gov.ru/lotSearchArchive.html?bidKindId=2')
#print urllib.proxy_bypass_registry('torgi.gov.ru')
print datetime.datetime.now()
This onу GET requests to this wesite takes 6-7 seconds. Now comment the following code from the urllib.py from the proxy_bypass_registry function:
try:
fqdn = socket.getfqdn(rawHost)
if fqdn != rawHost:
host.append(fqdn)
except socket.error:
pass
Now the same GET request takes 2 second. It is normal because this website takes 2 seconds for response.
|
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:12 | admin | set | github: 67573 |
| 2017年02月18日 12:52:23 | juliadolgova | set | nosy:
+ juliadolgova |
| 2015年03月08日 17:25:32 | BreamoreBoy | set | nosy:
+ orsenthil components: + Library (Lib) |
| 2015年02月03日 09:05:39 | aristotel | create | |