Return the port number for the request as a string.
(self)
| 210 | raise DisallowedHost(msg) |
| 211 | |
| 212 | def get_port(self): |
| 213 | """Return the port number for the request as a string.""" |
| 214 | if settings.USE_X_FORWARDED_PORT and "HTTP_X_FORWARDED_PORT" in self.META: |
| 215 | port = self.META["HTTP_X_FORWARDED_PORT"] |
| 216 | else: |
| 217 | port = self.META["SERVER_PORT"] |
| 218 | return str(port) |
| 219 | |
| 220 | def get_full_path(self, force_append_slash=False): |
| 221 | return self._get_full_path(self.path, force_append_slash) |
no outgoing calls