diff --git a/django/http/request.py b/django/http/request.py index 3440e3b95d..4e4447f35f 100644 --- a/django/http/request.py +++ b/django/http/request.py @@ -346,11 +346,7 @@ class HttpRequest: raise UnreadablePostError(*e.args) from e def __iter__(self): - while True: - buf = self.readline() - if not buf: - break - yield buf + return iter(self.readline, b'') def xreadlines(self): warnings.warn(