From 0053e3eb1ab2d8dbe1cf2950e48e18538b6f43c4 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Mon, 10 Aug 2015 14:11:53 +0000 Subject: [PATCH] route : redirect to myself : code 400 git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2226 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- route.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/route.php b/route.php index 79e467e..3a47f46 100644 --- a/route.php +++ b/route.php @@ -191,7 +191,7 @@ class route throw new Exception ("Destination URL is empty", 500); // Allow to redirect from POST to GET, but not GET to GET (can loop) if ($destURL === $requestURL && $_SERVER["REQUEST_METHOD"] === "GET") - throw new Exception ("Redirect to myself", 508); + throw new Exception ("Redirect to myself", 400); if (substr_count ($baseURL, "../") > 1+ substr_count ($destURL,"/")) throw new Exception ("Can't redirect outside this site (Base $baseURL)", 405);