From aad8136cd1bd90312f4c41affd473c25c6a56932 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 7 Dec 2012 10:39:50 +0100 Subject: [PATCH] [HttpFoundation] fixed a small regression --- src/Symfony/Component/HttpFoundation/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index 01284cf724..546d0ffbd9 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -813,7 +813,7 @@ class Request } // Trim and remove port number from host - $host = trim(preg_replace('/:\d+$/', '', $host)); + $host = preg_replace('/:\d+$/', '', trim($host)); // as the host can come from the user (HTTP_HOST and depending on the configuration, SERVER_NAME too can come from the user) // check that it does not contain forbidden characters (see RFC 952 and RFC 2181)