Skip to content

Commit

Permalink
[browser kit] Client now stores filtered response after request.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanfrancois.simon committed Jun 5, 2012
1 parent 1541fe2 commit ce7e1e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Symfony/Component/BrowserKit/Client.php
Expand Up @@ -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'));
}

/**
Expand Down

0 comments on commit ce7e1e6

Please sign in to comment.