diff --git a/src/Symfony/Component/BrowserKit/Client.php b/src/Symfony/Component/BrowserKit/Client.php index c57b9e37a1b3..06b64b3c475e 100644 --- a/src/Symfony/Component/BrowserKit/Client.php +++ b/src/Symfony/Component/BrowserKit/Client.php @@ -264,17 +264,17 @@ public function request($method, $uri, array $parameters = array(), array $files $this->response = $this->doRequest($this->request); } - $response = $this->filterResponse($this->response); + $this->response = $this->filterResponse($this->response); - $this->cookieJar->updateFromResponse($response); + $this->cookieJar->updateFromResponse($this->response); - $this->redirect = $response->getHeader('Location'); + $this->redirect = $this->response->getHeader('Location'); if ($this->followRedirects && $this->redirect) { return $this->crawler = $this->followRedirect(); } - return $this->crawler = $this->createCrawlerFromContent($request->getUri(), $response->getContent(), $response->getHeader('Content-Type')); + return $this->crawler = $this->createCrawlerFromContent($request->getUri(), $this->response->getContent(), $this->response->getHeader('Content-Type')); } /**