From 60fbb9dd2112e9f960b825bac195769153d8f042 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Tue, 29 May 2018 14:22:05 +0200 Subject: [PATCH] Fix sent headers when downloading an nzb --- Changelog | 1 + app/Http/Controllers/GetNzbController.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index 230dec6fd..3e35cb241 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2018-05-29 DariusIII + * Fix: Fix sent headers when downloading an nzb * Fix: Fix group browsing list page 2018-05-28 DariusIII * Chg: Move API related routes to routes/api.php diff --git a/app/Http/Controllers/GetNzbController.php b/app/Http/Controllers/GetNzbController.php index afb73678a..3dc8363e0 100644 --- a/app/Http/Controllers/GetNzbController.php +++ b/app/Http/Controllers/GetNzbController.php @@ -108,9 +108,9 @@ class GetNzbController extends BasePageController $nzbPath = (new NZB())->getNZBPath($request->input('id')); - if (! File::exists($nzbPath)) { + /*if (! File::exists($nzbPath)) { Utility::showApiError(300, 'NZB file not found!'); - } + }*/ $relData = Release::getByGuid($request->input('id')); if ($relData !== null) { @@ -126,7 +126,7 @@ class GetNzbController extends BasePageController $cleanName = str_replace([',', ' ', '/'], '_', $relData['searchname']); - $headers[] = [ + $headers = [ 'Content-Disposition:' => 'attachment; filename='.$cleanName.'.nzb', 'Content-Type:' => 'application/x-nzb', 'Expires:' => date('r', Carbon::now()->addDays(365)->timestamp),