Message103928
| Author |
santoso.wijaya |
| Recipients |
aerodonkey, santoso.wijaya |
| Date |
2010年04月22日.00:03:57 |
| SpamBayes Score |
0.03587253 |
| Marked as misclassified |
No |
| Message-id |
<1271894639.49.0.487597912366.issue6085@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
There is a simple workaround to bypass the hostname resolution mechanism, so that the server can respond faster.
# This is a hack to patch slow socket.getfqdn calls that
# BaseHTTPServer (and its subclasses) make.
# See: http://bugs.python.org/issue6085
# See: http://www.answermysearches.com/xmlrpc-server-slow-in-python-how-to-fix/2140/
import BaseHTTPServer
def _bare_address_string(self):
host, port = self.client_address[:2]
return '%s' % host
BaseHTTPServer.BaseHTTPRequestHandler.address_string = \
_bare_address_string
# End hack. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年04月22日 00:04:00 | santoso.wijaya | set | recipients:
+ santoso.wijaya, aerodonkey |
| 2010年04月22日 00:03:59 | santoso.wijaya | set | messageid: <1271894639.49.0.487597912366.issue6085@psf.upfronthosting.co.za> |
| 2010年04月22日 00:03:57 | santoso.wijaya | link | issue6085 messages |
| 2010年04月22日 00:03:57 | santoso.wijaya | create |
|