summaryrefslogtreecommitdiff
path: root/framework/Web/THttpResponse.php
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2012-03-24 23:13:29 +0000
committerctrlaltca@gmail.com <>2012-03-24 23:13:29 +0000
commitafa72375ca68d10e6b626f45fb713feb69696f21 (patch)
tree01c1ec7113bf0a5ccbeba90292acda4e39f78087 /framework/Web/THttpResponse.php
parent76d7735f8de76dfc4fa0ff671e5f18ae025bbcf3 (diff)
patch for #393 + updated docs
Diffstat (limited to 'framework/Web/THttpResponse.php')
-rw-r--r--framework/Web/THttpResponse.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php
index 1f0bf6f2..d76648b7 100644
--- a/framework/Web/THttpResponse.php
+++ b/framework/Web/THttpResponse.php
@@ -426,8 +426,8 @@ class THttpResponse extends TModule implements ITextWriter
*/
public function httpRedirect($url)
{
- if(!$this->getApplication()->getRequestCompleted())
- $this->getApplication()->onEndRequest();
+ $this->ensureHeadersSent();
+
if($url[0]==='/')
$url=$this->getRequest()->getBaseUrl().$url;
if ($this->_status >= 300 && $this->_status < 400)
@@ -436,6 +436,9 @@ class THttpResponse extends TModule implements ITextWriter
else
header('Location: '.str_replace('&amp;','&',$url));
+ if(!$this->getApplication()->getRequestCompleted())
+ $this->getApplication()->onEndRequest();
+
exit();
}