Sending custom HTTP status codes to prevent conflicts
authorAlexander Ebert <ebert@woltlab.com>
Mon, 27 May 2013 23:02:28 +0000 (01:02 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 27 May 2013 23:02:28 +0000 (01:02 +0200)
Fixes #1308

wcfsetup/install/files/lib/system/exception/AJAXException.class.php

index c142fc1adc4dcacb3be4574affb9f140ef47a049..4318a2241e458d7a9e8a2891703d219e22abdeb2 100644 (file)
@@ -77,7 +77,7 @@ class AJAXException extends LoggedException {
                        break;
                        
                        case self::SESSION_EXPIRED:
-                               $statusHeader = 'HTTP/1.0 401 Unauthorized';
+                               $statusHeader = 'HTTP/1.0 430 Session Expired';
                        break;
                        
                        case self::INSUFFICIENT_PERMISSIONS:
@@ -85,7 +85,7 @@ class AJAXException extends LoggedException {
                        break;
                        
                        case self::BAD_PARAMETERS:
-                               $statusHeader = 'HTTP/1.0 412 Precondition Failed';
+                               $statusHeader = 'HTTP/1.0 431 Bad Parameters';
                                
                                $responseData['exceptionID'] = $exceptionID;
                        break;