aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/public.php6
-rw-r--r--lib/private/legacy/response.php10
2 files changed, 8 insertions, 8 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)));
diff --git a/lib/private/legacy/response.php b/lib/private/legacy/response.php
index 0a49eb9643f..4186822c269 100644
--- a/lib/private/legacy/response.php
+++ b/lib/private/legacy/response.php
@@ -31,7 +31,7 @@
*/
class OC_Response {
- const STATUS_FOUND = 304;
+ const STATUS_FOUND = 302;
const STATUS_NOT_MODIFIED = 304;
const STATUS_TEMPORARY_REDIRECT = 307;
const STATUS_BAD_REQUEST = 400;
@@ -51,12 +51,12 @@ class OC_Response {
$status = $status . ' Not Modified';
break;
case self::STATUS_TEMPORARY_REDIRECT:
- if ($protocol == 'HTTP/1.1') {
- $status = $status . ' Temporary Redirect';
- break;
- } else {
+ if ($protocol == 'HTTP/1.0') {
$status = self::STATUS_FOUND;
// fallthrough
+ } else {
+ $status = $status . ' Temporary Redirect';
+ break;
}
case self::STATUS_FOUND;
$status = $status . ' Found';