From c6ef09ac7edfb131d54fa7e9bb1e9b12a570d640 Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Tue, 20 Sep 2022 13:08:40 +0100 Subject: [PATCH] Successfully load compressed databases mime-typed as "application/x-tar" --- CHANGELOG.md | 6 ++++++ src/locus_loader.erl | 2 ++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f109d9a..fbc7b40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- failed load of .tgz database when its mime type is listed as "application/x-tar" + ## [2.3.5] - 2022-09-20 ### Fixed diff --git a/src/locus_loader.erl b/src/locus_loader.erl index 9ff40fd..efeb069 100644 --- a/src/locus_loader.erl +++ b/src/locus_loader.erl @@ -914,6 +914,8 @@ fetched_database_format_and_blob({remote, From}, #{headers := Headers, body := B {tgz, Body}; {{_, "application/x-tgz"}, _} -> {tgz, Body}; + {{_, "application/x-tar"}, <>} -> + {tgz, Body}; {{_, "application/x-tar"}, _} -> {tarball, Body}; {_, <>} ->