aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/public.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-03-13 09:22:26 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-03-13 09:22:26 +0100
commit53a899a1f54401c06e361c05f5b739cd895b98a2 (patch)
treea4e0eedf09ef71357f01b6fd9c0916542db5ed6b /apps/files_sharing/public.php
parente758cfcdc83bcf30d4e1677fdf6c06614c2167ab (diff)
downloadnextcloud-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.php6
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)));