backup: fix restore erroring due to closed reader

This commit is contained in:
Matthew Penner 2023-01-29 17:06:49 -07:00
parent 304fd91283
commit 2d640209e5
No known key found for this signature in database

View File

@ -147,7 +147,6 @@ func postServerRestoreBackup(c *gin.Context) {
middleware.CaptureAndAbort(c, err)
return
}
defer res.Body.Close()
// Don't allow content types that we know are going to give us problems.
if res.Header.Get("Content-Type") == "" || !strings.Contains("application/x-gzip application/gzip", res.Header.Get("Content-Type")) {
_ = res.Body.Close()