A string representing the scheme of the request. 'http' or 'https'.
(self)
| 122 | |
| 123 | @reify |
| 124 | def scheme(self): |
| 125 | """A string representing the scheme of the request. |
| 126 | |
| 127 | 'http' or 'https'. |
| 128 | """ |
| 129 | if self._transport.get_extra_info('sslcontext'): |
| 130 | return 'https' |
| 131 | secure_proxy_ssl_header = self._secure_proxy_ssl_header |
| 132 | if secure_proxy_ssl_header is not None: |
| 133 | header, value = secure_proxy_ssl_header |
| 134 | if self.headers.get(header) == value: |
| 135 | return 'https' |
| 136 | return 'http' |
| 137 | |
| 138 | @reify |
| 139 | def method(self): |