resolve http server can't send file large than 2GB (Fix #1290) (#1294)

* resolve problem: http server can't send file large than 2GB.
add unit test for http server send large file.
add /bigobj compile option to msvc x64.

* disable unit test "ServerLargeContentTest" due to out-of-memory on GitHub Actions.
This commit is contained in:
conghuawang 2022-05-27 23:56:20 +08:00 committed by GitHub
parent a5a62768c0
commit df20c27696
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 1 deletions

View file

@ -4691,7 +4691,7 @@ inline ssize_t SocketStream::read(char *ptr, size_t size) {
inline ssize_t SocketStream::write(const char *ptr, size_t size) {
if (!is_writable()) { return -1; }
#ifdef _WIN32
#if defined(_WIN32) && !defined(_WIN64)
size =
(std::min)(size, static_cast<size_t>((std::numeric_limits<int>::max)()));
#endif