Increase mas file size limit.

GitOrigin-RevId: d10bb8abe7c70a2c94b0edc6f6d1fb08e49c7267
This commit is contained in:
levlam 2020-07-23 01:59:28 +03:00
parent b970cc4e5e
commit db628a8c9e
2 changed files with 3 additions and 3 deletions

View File

@ -378,7 +378,7 @@ class CliClient final : public Actor {
auto r_stat = stat(file_generation.source);
if (r_stat.is_ok()) {
auto size = r_stat.ok().size_;
if (size <= 0 || size > 1500000000) {
if (size <= 0 || size > (2000 << 20)) {
r_stat = Status::Error(400, size == 0 ? Slice("File is empty") : Slice("File is too big"));
}
}

View File

@ -15,8 +15,8 @@ class HttpChunkedByteFlow final : public ByteFlowBase {
bool loop() override;
private:
static constexpr int MAX_CHUNK_SIZE = 15 << 20; // some reasonable limit
static constexpr int MAX_SIZE = 150 << 20; // some reasonable limit
static constexpr int MAX_CHUNK_SIZE = 15 << 20; // some reasonable limit
static constexpr int MAX_SIZE = std::numeric_limits<int32>::max(); // some reasonable limit
static constexpr size_t MIN_UPDATE_SIZE = 1 << 14;
enum class State { ReadChunkLength, ReadChunkContent, OK };
State state_ = State::ReadChunkLength;