fix error message when empty payload

This commit is contained in:
mpostma 2021-02-17 12:16:54 +01:00
parent 93ce32d94d
commit ae9a41a19f
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
4 changed files with 2 additions and 49 deletions

View file

@ -38,7 +38,6 @@ impl Data {
file.sync_all().await?;
let file = file.into_std().await;
let index_controller = self.index_controller.clone();
let update = tokio::task::spawn_blocking(move ||{
let mmap;

View file

@ -88,7 +88,7 @@ impl UpdateHandler {
builder.index_documents_method(method);
let gzipped = true;
let reader = if gzipped {
let reader = if gzipped && !content.is_empty() {
Box::new(GzDecoder::new(content))
} else {
Box::new(content) as Box<dyn io::Read>