##// END OF EJS Templates
Update keepalive.py to current CVS version of urlgrabber....
Alexis S. L. Carvalho -
r2444:5eb02f9e default
parent child Browse files
Show More
@@ -99,7 +99,7 b' EXTRA ATTRIBUTES AND METHODS'
99
99
100 """
100 """
101
101
102 # $Id: keepalive.py,v 1.13 2005/10/22 21:57:28 mstenner Exp $
102 # $Id: keepalive.py,v 1.14 2006/04/04 21:00:32 mstenner Exp $
103
103
104 import urllib2
104 import urllib2
105 import httplib
105 import httplib
@@ -249,12 +249,14 b' class HTTPHandler(urllib2.HTTPHandler):'
249 r._url = req.get_full_url()
249 r._url = req.get_full_url()
250 r._connection = h
250 r._connection = h
251 r.code = r.status
251 r.code = r.status
252 r.headers = r.msg
253 r.msg = r.reason
252
254
253 if r.status == 200 or not HANDLE_ERRORS:
255 if r.status == 200 or not HANDLE_ERRORS:
254 return r
256 return r
255 else:
257 else:
256 return self.parent.error('http', req, r, r.status, r.reason, r.msg)
258 return self.parent.error('http', req, r,
257
259 r.status, r.msg, r.headers)
258
260
259 def _reuse_connection(self, h, req, host):
261 def _reuse_connection(self, h, req, host):
260 """start the transaction with a re-used connection
262 """start the transaction with a re-used connection
@@ -371,7 +373,7 b' class HTTPResponse(httplib.HTTPResponse)'
371 self.close()
373 self.close()
372
374
373 def info(self):
375 def info(self):
374 return self.msg
376 return self.headers
375
377
376 def geturl(self):
378 def geturl(self):
377 return self._url
379 return self._url
@@ -2,8 +2,4 b' abort: error: Connection refused'
2 255
2 255
3 copy: No such file or directory
3 copy: No such file or directory
4 abort: HTTP Error 404
4 abort: HTTP Error 404
5 Date:
6 Content-Type: text/html
7 Connection: close
8
9 0
5 0
General Comments 0
You need to be logged in to leave comments. Login now