1147: Increasing payload default size r=LegendreM a=sanders41

References issue #1137

Increasing the default payload size from 10mb to 100mb.

Co-authored-by: Paul Sanders <psanders1@gmail.com>
This commit is contained in:
bors[bot] 2021-01-04 12:47:06 +00:00 committed by GitHub
commit e3d1314bd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ pub struct Opt {
pub max_udb_size: usize, pub max_udb_size: usize,
/// The maximum size, in bytes, of accepted JSON payloads /// The maximum size, in bytes, of accepted JSON payloads
#[structopt(long, env = "MEILI_HTTP_PAYLOAD_SIZE_LIMIT", default_value = "10485760")] // 10MB #[structopt(long, env = "MEILI_HTTP_PAYLOAD_SIZE_LIMIT", default_value = "104857600")] // 100MB
pub http_payload_size_limit: usize, pub http_payload_size_limit: usize,
/// Read server certificates from CERTFILE. /// Read server certificates from CERTFILE.

View File

@ -57,7 +57,7 @@ impl Server {
no_analytics: true, no_analytics: true,
max_mdb_size: default_db_options.main_map_size, max_mdb_size: default_db_options.main_map_size,
max_udb_size: default_db_options.update_map_size, max_udb_size: default_db_options.update_map_size,
http_payload_size_limit: 10000000, http_payload_size_limit: 100000000,
..Opt::default() ..Opt::default()
}; };

View File

@ -177,7 +177,7 @@ async fn document_not_found_error() {
#[actix_rt::test] #[actix_rt::test]
async fn payload_too_large_error() { async fn payload_too_large_error() {
let mut server = common::Server::with_uid("test"); let mut server = common::Server::with_uid("test");
let bigvec = vec![0u64; 10_000_000]; // 80mb let bigvec = vec![0u64; 100_000_000]; // 800mb
assert_error!( assert_error!(
"payload_too_large", "payload_too_large",
"invalid_request_error", "invalid_request_error",