* Fixed https://github.com/abersheeran/asgi-ratelimit/issues/14
* lint it
* Black it
Co-authored-by: euri10 <euri10@users.noreply.github.com>
raw_kwargs["status"] = message["status"]
raw_kwargs["reason"] = _get_reason_phrase(message["status"])
raw_kwargs["headers"] = [
- (key.decode(), value.decode()) for key, value in message["headers"]
+ (key.decode(), value.decode())
+ for key, value in message.get("headers", [])
]
raw_kwargs["preload_content"] = False
raw_kwargs["original_response"] = _MockOriginalResponse(