diff --git a/src/HttpCookie.php b/src/HttpCookie.php
index <HASH>..<HASH> 100644
--- a/src/HttpCookie.php
+++ b/src/HttpCookie.php
@@ -102,7 +102,7 @@ class HttpCookie implements Cookie
     public function getHeaderString()
     {
         $parts = [
-            $this->name . '=' . $this->value,
+            $this->name . '=' . urlencode($this->value),
         ];
 
         if ($this->maxAge !== null) {
diff --git a/test/Unit/HttpCookieTest.php b/test/Unit/HttpCookieTest.php
index <HASH>..<HASH> 100644
--- a/test/Unit/HttpCookieTest.php
+++ b/test/Unit/HttpCookieTest.php
@@ -17,6 +17,9 @@ class HttpCookieTest extends \PHPUnit_Framework_TestCase
         $cookie = new HttpCookie('name', 'value');
         $cookie->setValue('newValue');
         $this->assertEquals($cookie->getHeaderString(), 'name=newValue');
+
+        $cookie->setValue('new Value"');
+        $this->assertEquals($cookie->getHeaderString(), 'name=new+Value%22');
     }
 
     public function testSetMaxAge()
added url encoding to cookie values