From ce7e1e6c9a39134c154c7ec883c670bdc1951cbd Mon Sep 17 00:00:00 2001 From: "jeanfrancois.simon" Date: Tue, 5 Jun 2012 10:37:06 +0200 Subject: [PATCH] [browser kit] Client now stores filtered response after request. --- src/Symfony/Component/BrowserKit/Client.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/BrowserKit/Client.php b/src/Symfony/Component/BrowserKit/Client.php index c57b9e37a1..06b64b3c47 100644 --- a/src/Symfony/Component/BrowserKit/Client.php +++ b/src/Symfony/Component/BrowserKit/Client.php @@ -264,17 +264,17 @@ abstract class Client $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')); } /**