Skip to content

Conversation

@blyxxyz
Copy link
Contributor

@blyxxyz blyxxyz commented Jan 22, 2025

This command would hang forever:

$ echo test > test.txt
$ http -x httpbin.org/post @test.txt

HTTPie would read the file, compress it, then discard the compressed data because it's larger than the original. This made request.body an exhausted file handle, which requests doesn't seem to like.

(Maybe it would be better in this case to do unconditional streaming compression to avoid buffering large files. We might do that in xh. But that would be a bigger change.)

This command would hang forever:

```console
$ echo test > test.txt
$ http -x httpbin.org/post @test.txt
```

HTTPie would read the file, compress it, then discard the compressed
data because it's larger than the original. This made `request.body`
an exhausted file handle, which `requests` doesn't seem to like.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant