From 0da1d053d3e678375f50b499d276fe8b7f2ec77e Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sat, 30 Apr 2016 03:22:46 +0200 Subject: [PATCH] Don't convert audio on HEAD requests --- controllers/FrontController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controllers/FrontController.php b/controllers/FrontController.php index 7622ce9..c28f04f 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -196,7 +196,10 @@ class FrontController ); $chain->add('|', $avconvProc); } - return $response->withBody(new PopenStream($chain->getProcess()->getCommandLine())); + if ($request->isGet()) { + $response = $response->withBody(new PopenStream($chain->getProcess()->getCommandLine())); + } + return $response; } } catch (\Exception $e) { $error = $e->getMessage();