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