[browser kit] Client now stores filtered response after request.

This commit is contained in:
jeanfrancois.simon 2012-06-05 10:37:06 +02:00
parent 1541fe26e4
commit ce7e1e6c9a
1 changed files with 4 additions and 4 deletions

View File

@ -264,17 +264,17 @@ abstract class Client
$this->response = $this->doRequest($this->request); $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) { if ($this->followRedirects && $this->redirect) {
return $this->crawler = $this->followRedirect(); 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'));
} }
/** /**