Consider stream readable when EOS is reached.

Fixes #1373
This commit is contained in:
Marvin W 2023-03-01 23:56:43 +01:00
parent 74ca991ddf
commit 503de303d7
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A

View file

@ -66,7 +66,7 @@ public class FileProvider : Dino.FileProvider, Object {
public bool is_readable() { public bool is_readable() {
if (!can_poll()) throw new IOError.NOT_SUPPORTED("Stream is not pollable"); if (!can_poll()) throw new IOError.NOT_SUPPORTED("Stream is not pollable");
return ((PollableInputStream)inner).is_readable(); return remaining_size <= 0 || ((PollableInputStream)inner).is_readable();
} }
private ssize_t check_limit(ssize_t read) throws IOError { private ssize_t check_limit(ssize_t read) throws IOError {