Fix sent headers when downloading an nzb

This commit is contained in:
DariusIII
2018-05-29 14:22:05 +02:00
parent cc7c17acaf
commit 60fbb9dd21
2 changed files with 4 additions and 3 deletions
+3 -3
View File
@@ -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),