From 79da3667312a9e6c6049a63f3fbbc5ff69dedb2e Mon Sep 17 00:00:00 2001 From: Eugene Stepanov Date: Wed, 3 Jul 2013 14:33:34 +0300 Subject: [PATCH] for fixing bug #21 convert headers --- src/Behat/Mink/Driver/Goutte/Client.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Behat/Mink/Driver/Goutte/Client.php b/src/Behat/Mink/Driver/Goutte/Client.php index 358b249..e285702 100644 --- a/src/Behat/Mink/Driver/Goutte/Client.php +++ b/src/Behat/Mink/Driver/Goutte/Client.php @@ -27,8 +27,6 @@ class Client extends BaseClient protected function createResponse(GuzzleResponse $response) { $body = $response->getBody(true); - $statusCode = $response->getStatusCode(); - $headers = $response->getHeaders()->getAll(); $contentType = $response->getContentType(); if (!$contentType || false === strpos($contentType, 'charset=')) { @@ -36,8 +34,8 @@ protected function createResponse(GuzzleResponse $response) $contentType .= ';charset='.$matches[1]; } } - $headers['Content-Type'] = $contentType; + $response->setHeader('Content-Type', $contentType); - return new Response($body, $statusCode, $headers); + return parent::createResponse($response); } }