diff --git a/CHANGES/9174.misc.rst b/CHANGES/9174.misc.rst new file mode 100644 index 00000000000..13dc00ec1de --- /dev/null +++ b/CHANGES/9174.misc.rst @@ -0,0 +1 @@ +Improved performance of web requests -- by :user:`bdraco`. diff --git a/aiohttp/helpers.py b/aiohttp/helpers.py index 6abbe74d8cf..40705b16d71 100644 --- a/aiohttp/helpers.py +++ b/aiohttp/helpers.py @@ -973,6 +973,7 @@ def parse_http_date(date_str: Optional[str]) -> Optional[datetime.datetime]: return None +@functools.lru_cache def must_be_empty_body(method: str, code: int) -> bool: """Check if a request must return an empty body.""" return (