Show More
@@ -99,7 +99,7 b' EXTRA ATTRIBUTES AND METHODS' | |||||
99 |
|
99 | |||
100 | """ |
|
100 | """ | |
101 |
|
101 | |||
102 |
# $Id: keepalive.py,v 1.1 |
|
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, |
|
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. |
|
376 | return self.headers | |
375 |
|
377 | |||
376 | def geturl(self): |
|
378 | def geturl(self): | |
377 | return self._url |
|
379 | return self._url |
General Comments 0
You need to be logged in to leave comments.
Login now