From 366b4b891969ba19331e91b9af1c3f0d703103ff Mon Sep 17 00:00:00 2001 From: Tim Wagner Date: Wed, 8 Apr 2015 13:43:29 +0200 Subject: [PATCH] Fixed #735 - Endless Loop for URLs without servlet name --- CHANGELOG.md | 1 + src/AppserverIo/Appserver/ServletEngine/Http/Request.php | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78fb991c1..9f100aa23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Bugfixes +* Fixed [#735](https://github.com/appserver-io/appserver/issues/735) - Endless Loop for URLs without servlet name * Fixed [#719](https://github.com/appserver-io/appserver/issues/719) - Around advice chain does break at certain size * Fixed [#721](https://github.com/appserver-io/appserver/issues/721) - Different order of Advices in pointcut.xml depending on type diff --git a/src/AppserverIo/Appserver/ServletEngine/Http/Request.php b/src/AppserverIo/Appserver/ServletEngine/Http/Request.php index 48132c9dd..b10e6036c 100644 --- a/src/AppserverIo/Appserver/ServletEngine/Http/Request.php +++ b/src/AppserverIo/Appserver/ServletEngine/Http/Request.php @@ -255,9 +255,11 @@ public function prepare() // set the context path $this->setContextPath($contextPath); - // load the request URI and query string - $uri = $this->getUri(); - $queryString = $this->getQueryString(); + // Fixed #735 - Endless Loop for URLs without servlet name + // Load the request URI and query string from the server vars, because we have to + // take care about changes from other modules like directory or rewrite module! + $uri = $this->getServerVar(ServerVars::X_REQUEST_URI); + $queryString = $this->getServerVar(ServerVars::QUERY_STRING); // get uri without querystring $uriWithoutQueryString = str_replace('?' . $queryString, '', $uri);