diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-03-09 07:41:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-09 07:41:32 -0500 |
commit | 7fdc6cefb3017f3c4bbe1d824e1de249ac29d219 (patch) | |
tree | eb7529b1b438b4cbff3c5ca6d30391f1bfd10a49 /synapse/http/federation | |
parent | Handle image transparency better when thumbnailing. (#9473) (diff) | |
download | synapse-7fdc6cefb3017f3c4bbe1d824e1de249ac29d219.tar.xz |
Fix additional type hints. (#9543)
Type hint fixes due to Twisted 21.2.0 adding type hints.
Diffstat (limited to 'synapse/http/federation')
-rw-r--r-- | synapse/http/federation/well_known_resolver.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/http/federation/well_known_resolver.py b/synapse/http/federation/well_known_resolver.py index 4def7d7633..ecd63e6596 100644 --- a/synapse/http/federation/well_known_resolver.py +++ b/synapse/http/federation/well_known_resolver.py @@ -322,7 +322,8 @@ def _cache_period_from_headers( def _parse_cache_control(headers: Headers) -> Dict[bytes, Optional[bytes]]: cache_controls = {} - for hdr in headers.getRawHeaders(b"cache-control", []): + cache_control_headers = headers.getRawHeaders(b"cache-control") or [] + for hdr in cache_control_headers: for directive in hdr.split(b","): splits = [x.strip() for x in directive.split(b"=", 1)] k = splits[0].lower() |