Changeset 5021
- Timestamp:
- 09/09/07 18:26:55 (2 years ago)
- Files:
-
- trunk/lib/controller/sfWebController.class.php (modified) (1 diff)
- trunk/lib/filter/sfRenderingFilter.class.php (modified) (1 diff)
- trunk/lib/response/sfWebResponse.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/controller/sfWebController.class.php
r4951 r5021 199 199 $url = $this->genUrl($url, true); 200 200 201 if (sfConfig::get('sf_logging_enabled')) 202 { 203 $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Redirect to "%s"', $url)))); 204 } 205 206 // redirect 201 207 $response = $this->context->getResponse(); 202 203 // redirect204 208 $response->clearHttpHeaders(); 205 209 $response->setStatusCode($statusCode); 206 210 $response->setHttpHeader('Location', $url); 207 211 $response->setContent(sprintf('<html><head><meta http-equiv="refresh" content="%d;url=%s"/></head></html>', $delay, htmlentities($url, ENT_QUOTES, sfConfig::get('sf_charset')))); 208 209 if (sfConfig::get('sf_logging_enabled')) 210 { 211 $this->dispatcher->notify(new sfEvent($this, 'application.log', array(sprintf('Redirect to "%s"', $url)))); 212 } 213 214 if (!sfConfig::get('sf_test')) 215 { 216 $response->sendHttpHeaders(); 217 } 218 $response->sendContent(); 212 $response->send(); 219 213 } 220 214 } trunk/lib/filter/sfRenderingFilter.class.php
r4951 r5021 41 41 $response = $this->context->getResponse(); 42 42 43 // send headers 44 $response->sendHttpHeaders(); 45 46 // send content 47 $response->sendContent(); 43 // send headers + content 44 $response->send(); 48 45 49 46 // log timers information trunk/lib/response/sfWebResponse.class.php
r5020 r5021 272 272 public function sendHttpHeaders() 273 273 { 274 if (sfConfig::get('sf_test')) 275 { 276 return; 277 } 278 274 279 // status 275 280 $status = 'HTTP/1.0 '.$this->statusCode.' '.$this->statusText;

