diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-03-12 18:42:30 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-03-12 18:42:30 +0100 |
commit | e758cfcdc83bcf30d4e1677fdf6c06614c2167ab (patch) | |
tree | fbbbdbc9a8b8a6af8ce4190f14e163c54eba527d /apps/files_sharing/public.php | |
parent | 3655951dd7372be9193e9ddd6f4b717f8d2cc6b4 (diff) | |
download | nextcloud-server-e758cfcdc83bcf30d4e1677fdf6c06614c2167ab.tar.gz nextcloud-server-e758cfcdc83bcf30d4e1677fdf6c06614c2167ab.zip |
Remove unused methods of OC_Response
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_sharing/public.php')
-rw-r--r-- | apps/files_sharing/public.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 0aae9e95800..7820455df58 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -28,7 +28,14 @@ $token = isset($_GET['t']) ? $_GET['t'] : ''; $route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadShare' : 'files_sharing.sharecontroller.showShare'; if($token !== '') { - OC_Response::redirect($urlGenerator->linkToRoute($route, array('token' => $token))); + $protocol = \OC::$server->getRequest()->getHttpProtocol(); + if ($protocol == 'HTTP/1.1') { + $status = '307 Temporary Redirect'; + } else { + $status = '304 Found'; + } + header($protocol.' ' . $status); + header('Location: ' . $urlGenerator->linkToRoute($route, array('token' => $token))); } else { header('HTTP/1.0 404 Not Found'); $tmpl = new OCP\Template('', '404', 'guest'); |