Skip to content

test client fails when following more than one redirect with body #2353

@davidism

Description

@davidism

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions