(self, req, data=None)
| 495 | return response |
| 496 | |
| 497 | def _open(self, req, data=None): |
| 498 | result = self._call_chain(self.handle_open, 'default', |
| 499 | 'default_open', req) |
| 500 | if result: |
| 501 | return result |
| 502 | |
| 503 | protocol = req.type |
| 504 | result = self._call_chain(self.handle_open, protocol, protocol + |
| 505 | '_open', req) |
| 506 | if result: |
| 507 | return result |
| 508 | |
| 509 | return self._call_chain(self.handle_open, 'unknown', |
| 510 | 'unknown_open', req) |
| 511 | |
| 512 | def error(self, proto, *args): |
| 513 | if proto in ('http', 'https'): |