BUG Request object now has URL changed

Instead of cloning the Request object and losing all the custom
attributes that don't come through the construct (eg: headers) we can
now set the URL alone.
This commit is contained in:
Daniel Hensby 2013-02-27 17:21:48 +00:00
parent b74af926ce
commit eb2e0d7877

View File

@ -117,12 +117,10 @@ class RootURLController extends Controller {
return $this->response; return $this->response;
} }
$request = new SS_HTTPRequest ( $request->setUrl(self::get_homepage_link() . '/');
$request->httpMethod(), self::get_homepage_link() . '/', $request->getVars(), $request->postVars()
);
$request->match('$URLSegment//$Action', true); $request->match('$URLSegment//$Action', true);
$controller = new ModelAsController(); $controller = new ModelAsController();
$result = $controller->handleRequest($request, $model); $result = $controller->handleRequest($request, $model);
$this->popCurrent(); $this->popCurrent();