When using follow_redirects=True, the test client incorrectly closes the input stream after the first redirect, rather than after all redirects. If the redirect status code was 307 or 308, the second redirect fails with ValueError: I/O operation on closed file. when it attempts to inspect the closed stream.
When using
follow_redirects=True, the test client incorrectly closes the input stream after the first redirect, rather than after all redirects. If the redirect status code was 307 or 308, the second redirect fails withValueError: I/O operation on closed file.when it attempts to inspect the closed stream.