summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-03-13 09:47:29 +0100
committerGitHub <noreply@github.com>2018-03-13 09:47:29 +0100
commit7488218535880faf4cb0000ee7f965747d30de6a (patch)
treeb4144fecc002706a2036633b6f5255f384cc0461 /apps
parent57eaa48e3d368fceac96507675f261b6a5a8b711 (diff)
parent53a899a1f54401c06e361c05f5b739cd895b98a2 (diff)
downloadnextcloud-server-7488218535880faf4cb0000ee7f965747d30de6a.tar.gz
nextcloud-server-7488218535880faf4cb0000ee7f965747d30de6a.zip
Merge pull request #8792 from nextcloud/cleanup-oc_response
Remove unused methods of OC_Response
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/public.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 0aae9e95800..0ca7e8f245e 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.0') {
+ $status = '302 Found';
+ } else {
+ $status = '307 Temporary Redirect';
+ }
+ 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');