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 /lib | |
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 'lib')
-rw-r--r-- | lib/private/legacy/response.php | 10 |
1 files changed, 5 insertions, 5 deletions
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'; |