From 37fa018c2805042c4591516c3354a322f6cba31b Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 19 Jul 2020 13:17:05 +0300 Subject: [PATCH] Increase max content size in HttpReader. GitOrigin-RevId: c31b929989d4ab3d4baf6e487488a27b190a11c1 --- tdnet/td/net/HttpReader.h | 10 +++++----- tdutils/td/utils/port/Stat.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tdnet/td/net/HttpReader.h b/tdnet/td/net/HttpReader.h index fdb32c0b1..0b6cc6b0c 100644 --- a/tdnet/td/net/HttpReader.h +++ b/tdnet/td/net/HttpReader.h @@ -101,11 +101,11 @@ class HttpReader { void close_temp_file(); void clean_temporary_file(); - static constexpr size_t MAX_CONTENT_SIZE = 150 << 20; // Some reasonable limit - static constexpr size_t MAX_TOTAL_PARAMETERS_LENGTH = 1 << 16; // Some reasonable limit - static constexpr size_t MAX_TOTAL_HEADERS_LENGTH = 1 << 18; // Some reasonable limit - static constexpr size_t MAX_BOUNDARY_LENGTH = 70; // As defined by RFC1341 - static constexpr int64 MAX_FILE_SIZE = 2000 << 20; // Telegram server file size limit + static constexpr size_t MAX_CONTENT_SIZE = std::numeric_limits::max(); // Some reasonable limit + static constexpr size_t MAX_TOTAL_PARAMETERS_LENGTH = 1 << 16; // Some reasonable limit + static constexpr size_t MAX_TOTAL_HEADERS_LENGTH = 1 << 18; // Some reasonable limit + static constexpr size_t MAX_BOUNDARY_LENGTH = 70; // As defined by RFC1341 + static constexpr int64 MAX_FILE_SIZE = 2000 << 20; // Telegram server file size limit static constexpr const char TEMP_DIRECTORY_PREFIX[] = "tdlib-server-tmp"; }; diff --git a/tdutils/td/utils/port/Stat.cpp b/tdutils/td/utils/port/Stat.cpp index 7722b3e28..d92590bb0 100644 --- a/tdutils/td/utils/port/Stat.cpp +++ b/tdutils/td/utils/port/Stat.cpp @@ -45,7 +45,7 @@ #ifndef PSAPI_VERSION #define PSAPI_VERSION 1 #endif -#include +#include #endif