In the example below I'm calling "first" and then redirecting to "second". I would expect the header "User-Agent" to show the value "Internal" inside the "second" action but there are no response headers, and the request headers are unchanged.
What am I doing wrong, and how can I create an interaction between two actions where headers are exchanged?
The "fakeController" class:
class FakeController extends Controller
{
public function firstAction()
{
$this->response->setHeader("User-Agent","Internal");
$this->response->redirect("fake/second");
}
public function secondAction()
{
$rsHdr = $this->response->getHeaders();
$rqHdr = $this->request->getHeaders();
}
}