Skip to content

Commit

Permalink
Do not clone the initial request so that it is replaced correctly.
Browse files Browse the repository at this point in the history
Cloning the initial request resulted in the cloned request being replaced once an internal
request had been dispatched. This proved troublesome for middlewares that altered the
initial request as the cloned request then replaced the initial request after an
internal request was dispatched.

Reference issue dingo#894.
  • Loading branch information
jasonlewis committed Mar 17, 2016
1 parent 97c9220 commit 5ed48c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,13 @@ public function __construct(Container $container, Filesystem $files, Router $rou
}

/**
* Setup the request stack by cloning the initial request.
* Setup the request stack by grabbing the initial request.
*
* @return void
*/
protected function setupRequestStack()
{
$this->requestStack[] = clone $this->container['request'];
$this->requestStack[] = $this->container['request'];
}

/**
Expand Down

0 comments on commit 5ed48c8

Please sign in to comment.