diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-03-13 09:22:26 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-03-13 09:22:26 +0100 |
commit | 53a899a1f54401c06e361c05f5b739cd895b98a2 (patch) | |
tree | a4e0eedf09ef71357f01b6fd9c0916542db5ed6b /apps/files_sharing/public.php | |
parent | e758cfcdc83bcf30d4e1677fdf6c06614c2167ab (diff) | |
download | nextcloud-server-53a899a1f54401c06e361c05f5b739cd895b98a2.tar.gz nextcloud-server-53a899a1f54401c06e361c05f5b739cd895b98a2.zip |
Fix the HTTP 1.0 status code and properly detect 1.0 vs 1.1&2.0
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_sharing/public.php')
-rw-r--r-- | apps/files_sharing/public.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 7820455df58..0ca7e8f245e 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -29,10 +29,10 @@ $route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadShare if($token !== '') { $protocol = \OC::$server->getRequest()->getHttpProtocol(); - if ($protocol == 'HTTP/1.1') { - $status = '307 Temporary Redirect'; + if ($protocol == 'HTTP/1.0') { + $status = '302 Found'; } else { - $status = '304 Found'; + $status = '307 Temporary Redirect'; } header($protocol.' ' . $status); header('Location: ' . $urlGenerator->linkToRoute($route, array('token' => $token))); |