(self)
| 58 | return self.get_host() |
| 59 | |
| 60 | def get_full_url(self) -> str: |
| 61 | # Only return the response's URL if the user hadn't set the Host |
| 62 | # header |
| 63 | if not self._r.headers.get("Host"): |
| 64 | return self._r.url |
| 65 | # If they did set it, retrieve it and reconstruct the expected domain |
| 66 | host = to_native_string(self._r.headers["Host"], encoding="utf-8") |
| 67 | parsed = urlparse(self._r.url) |
| 68 | # Reconstruct the URL as we expect it |
| 69 | return urlunparse( |
| 70 | [ |
| 71 | parsed.scheme, |
| 72 | host, |
| 73 | parsed.path, |
| 74 | parsed.params, |
| 75 | parsed.query, |
| 76 | parsed.fragment, |
| 77 | ] |
| 78 | ) |
| 79 | |
| 80 | def is_unverifiable(self) -> bool: |
| 81 | return True |
nothing calls this directly
no test coverage detected