diff --git a/daphne/utils.py b/daphne/utils.py index 6c173ea..cd9e86e 100644 --- a/daphne/utils.py +++ b/daphne/utils.py @@ -45,9 +45,8 @@ def parse_x_forwarded_for(headers, # Lowercase all header names in the dict headers = {name.lower(): values for name, values in headers.items()} - # Make sure header names and values are bytes + # Make sure header names are bytes (values are checked in header_value) assert all(isinstance(name, bytes) for name in headers.keys()) - assert all(isinstance(value, bytes) for value in headers.values()) address_header_name = address_header_name.lower().encode("utf-8") result = original