Fix 4Gb limit streamed HTTP on Raspberry Pi 32bit (#1253)

Commits f2198ccfac and 4fcfe49bcc
are fixed 2Gb limit, but introduced 4Gb limit on Rasperry Pi 32 bit.
This is because the max value of type `size_t` is `4294967295` on this
system.
Furthermore, the Standard Library use `std::uintmax_t` as a type
of value returned by `std::filesystem::file_size`.
This commit is contained in:
Dmitry Igrishin
2021-05-09 15:06:50 +02:00
committed by GitHub
parent eb0ce83f2c
commit c0ba2eb7b4
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -43,11 +43,11 @@ private:
};
/* Per socket event handlers */
MoveOnlyFunction<bool(size_t)> onWritable;
MoveOnlyFunction<bool(uintmax_t)> onWritable;
MoveOnlyFunction<void()> onAborted;
MoveOnlyFunction<void(std::string_view, bool)> inStream; // onData
/* Outgoing offset */
size_t offset = 0;
uintmax_t offset = 0;
/* Current state (content-length sent, status sent, write called, etc */
int state = 0;