diff --git a/Slim/Environment.php b/Slim/Environment.php
index 707b2dc16de1cb8d5123ff6863b395a539c7a121..d0f3f0e004d53f9a3b54350971d0161b8170939f 100644
--- a/Slim/Environment.php
+++ b/Slim/Environment.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
@@ -126,35 +126,26 @@ class Environment implements \ArrayAccess, \IteratorAggregate
             //The IP
             $env['REMOTE_ADDR'] = $_SERVER['REMOTE_ADDR'];
 
-            /**
-             * Application paths
-             *
-             * This derives two paths: SCRIPT_NAME and PATH_INFO. The SCRIPT_NAME
-             * is the real, physical path to the application, be it in the root
-             * directory or a subdirectory of the public document root. The PATH_INFO is the
-             * virtual path to the requested resource within the application context.
-             *
-             * With htaccess, the SCRIPT_NAME will be an absolute path (without file name);
-             * if not using htaccess, it will also include the file name. If it is "/",
-             * it is set to an empty string (since it cannot have a trailing slash).
-             *
-             * The PATH_INFO will be an absolute path with a leading slash; this will be
-             * used for application routing.
-             */
-            if (strpos($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME']) === 0) {
-                $env['SCRIPT_NAME'] = $_SERVER['SCRIPT_NAME']; //Without URL rewrite
+            // Server params
+            $scriptName = $_SERVER['SCRIPT_NAME']; // <-- "/foo/index.php"
+            $requestUri = $_SERVER['REQUEST_URI']; // <-- "/foo/bar?test=abc" or "/foo/index.php/bar?test=abc"
+            $queryString = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : ''; // <-- "test=abc" or ""
+
+            // Physical path
+            if (strpos($requestUri, $scriptName) !== false) {
+                $physicalPath = $scriptName; // <-- Without rewriting
             } else {
-                $env['SCRIPT_NAME'] = str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'])); //With URL rewrite
-            }
-            $env['PATH_INFO'] = substr_replace($_SERVER['REQUEST_URI'], '', 0, strlen($env['SCRIPT_NAME']));
-            if (strpos($env['PATH_INFO'], '?') !== false) {
-                $env['PATH_INFO'] = substr_replace($env['PATH_INFO'], '', strpos($env['PATH_INFO'], '?')); //query string is not removed automatically
+                $physicalPath = str_replace('\\', '', dirname($scriptName)); // <-- With rewriting
             }
-            $env['SCRIPT_NAME'] = rtrim($env['SCRIPT_NAME'], '/');
-            $env['PATH_INFO'] = '/' . ltrim($env['PATH_INFO'], '/');
+            $env['SCRIPT_NAME'] = rtrim($physicalPath, '/'); // <-- Remove trailing slashes
 
-            //The portion of the request URI following the '?'
-            $env['QUERY_STRING'] = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '';
+            // Virtual path
+            $env['PATH_INFO'] = substr_replace($requestUri, '', 0, strlen($physicalPath)); // <-- Remove physical path
+            $env['PATH_INFO'] = str_replace('?' . $queryString, '', $env['PATH_INFO']); // <-- Remove query string
+            $env['PATH_INFO'] = '/' . ltrim($env['PATH_INFO'], '/'); // <-- Ensure leading slash
+
+            // Query string (without leading "?")
+            $env['QUERY_STRING'] = $queryString;
 
             //Name of server host that is running the script
             $env['SERVER_NAME'] = $_SERVER['SERVER_NAME'];
@@ -168,16 +159,6 @@ class Environment implements \ArrayAccess, \IteratorAggregate
                 $env[$key] = $value;
             }
 
-            // $specialHeaders = array('CONTENT_TYPE', 'CONTENT_LENGTH', 'PHP_AUTH_USER', 'PHP_AUTH_PW', 'PHP_AUTH_DIGEST', 'AUTH_TYPE');
-            // foreach ($_SERVER as $key => $value) {
-            //     $value = is_string($value) ? trim($value) : $value;
-            //     if (strpos($key, 'HTTP_') === 0) {
-            //         $env[substr($key, 5)] = $value;
-            //     } elseif (strpos($key, 'X_') === 0 || in_array($key, $specialHeaders)) {
-            //         $env[$key] = $value;
-            //     }
-            // }
-
             //Is the application running under HTTPS or HTTP protocol?
             $env['slim.url_scheme'] = empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === 'off' ? 'http' : 'https';
 
diff --git a/Slim/Exception/Pass.php b/Slim/Exception/Pass.php
index 2833dd0ecff6229d179fbcca5bd08e752dfc4803..b7fe1ee2bfa3f731550f27e44f51c18e2f72a1f6 100644
--- a/Slim/Exception/Pass.php
+++ b/Slim/Exception/Pass.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
diff --git a/Slim/Exception/Stop.php b/Slim/Exception/Stop.php
index 8667eaeaacbd40f191de5524ecc1ca71fd00e188..da03033b20d33fafb71dde38dee567139f522a83 100644
--- a/Slim/Exception/Stop.php
+++ b/Slim/Exception/Stop.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
diff --git a/Slim/Helper/Set.php b/Slim/Helper/Set.php
index 540931d6bc67f0ac9dc0aeb03bd0c0e69a8b1e01..e447938713f072f59943fd44883af7471d807ce3 100644
--- a/Slim/Helper/Set.php
+++ b/Slim/Helper/Set.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
@@ -139,6 +139,30 @@ class Set implements \ArrayAccess, \Countable, \IteratorAggregate
         unset($this->data[$this->normalizeKey($key)]);
     }
 
+    /**
+     * Property Overloading
+     */
+
+    public function __get($key)
+    {
+        return $this->get($key);
+    }
+
+    public function __set($key, $value)
+    {
+        $this->set($key, $value);
+    }
+
+    public function __isset($key)
+    {
+        return $this->has($key);
+    }
+
+    public function __unset($key)
+    {
+        return $this->remove($key);
+    }
+
     /**
      * Clear all values
      */
diff --git a/Slim/Http/Cookies.php b/Slim/Http/Cookies.php
index 61c70e74203ca8c02696f9efcf1ca0af56665f23..f00a2b643a1953007afa57103e5b1a16ff11d23d 100644
--- a/Slim/Http/Cookies.php
+++ b/Slim/Http/Cookies.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
diff --git a/Slim/Http/Headers.php b/Slim/Http/Headers.php
index 5e0283e6e1dd4a20a9aec9e031bd76c247bbfb9c..dc37a08d7af06709053d73558cdc83e20cfc058b 100644
--- a/Slim/Http/Headers.php
+++ b/Slim/Http/Headers.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
diff --git a/Slim/Http/Request.php b/Slim/Http/Request.php
index b7d32f985e66ccb988421e49f3ea0ca00f1f9531..ff8703f060d095c08c02097321a7b0175d2a7554 100644
--- a/Slim/Http/Request.php
+++ b/Slim/Http/Request.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
diff --git a/Slim/Http/Response.php b/Slim/Http/Response.php
index 1d3b729d58a31655fb881b8f3e78bed21643e6ee..c7a6499edfd48877f0ffa9c6a0b624f609a65f3f 100644
--- a/Slim/Http/Response.php
+++ b/Slim/Http/Response.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
@@ -480,7 +480,7 @@ class Response implements \ArrayAccess, \Countable, \IteratorAggregate
     }
 
     /**
-     * DEPRECATION WARNING! IteratorAggreate interface will be removed from \Slim\Http\Response.
+     * DEPRECATION WARNING! IteratorAggregate interface will be removed from \Slim\Http\Response.
      * Iterate `headers` or `cookies` properties directly.
      *
      * Get Iterator
diff --git a/Slim/Http/Util.php b/Slim/Http/Util.php
index e85a9a43e44fe15ad6261e85e446b424f79d9f57..e7cf6988dc0fec147007f081f9a0ef227d252b96 100644
--- a/Slim/Http/Util.php
+++ b/Slim/Http/Util.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
@@ -170,7 +170,7 @@ class Util
         //Decrypt value
         mcrypt_generic_init($module, $key, $iv);
         $decryptedData = @mdecrypt_generic($module, $data);
-        $res = str_replace("\x0", '', $decryptedData);
+        $res = rtrim($decryptedData, "\0");
         mcrypt_generic_deinit($module);
 
         return $res;
@@ -389,7 +389,7 @@ class Util
     /**
      * Parse cookie header
      *
-     * This method will parse the HTTP requst's `Cookie` header
+     * This method will parse the HTTP request's `Cookie` header
      * and extract cookies into an associative array.
      *
      * @param  string
@@ -431,5 +431,4 @@ class Util
 
         return pack("h*", $data1.$data2);
     }
-
 }
diff --git a/Slim/Log.php b/Slim/Log.php
index 1c679d07b41c1db7cd26afe7d1e5c8cf766efc12..824a40d9770c9dbdf9b88175c9a73aa0c5dac2fb 100644
--- a/Slim/Log.php
+++ b/Slim/Log.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
diff --git a/Slim/LogWriter.php b/Slim/LogWriter.php
index 47c1f4e406301ffc59436956396b6f88fc60cb5b..e3d91b0599c7c56aeb5fcff4bf58dd3b71564e72 100644
--- a/Slim/LogWriter.php
+++ b/Slim/LogWriter.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
diff --git a/Slim/Middleware.php b/Slim/Middleware.php
index 09ff17767759de903d91fc87afa64d4b307c3028..f316b17fccf71ca0905966ba70e58003b3e17277 100644
--- a/Slim/Middleware.php
+++ b/Slim/Middleware.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
diff --git a/Slim/Middleware/ContentTypes.php b/Slim/Middleware/ContentTypes.php
index 809b500c0708e7781062fe593264309f29ce3dd5..3e024eec95d28f6175c169f4002f6faad68d3010 100644
--- a/Slim/Middleware/ContentTypes.php
+++ b/Slim/Middleware/ContentTypes.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
@@ -137,7 +137,10 @@ class ContentTypes extends \Slim\Middleware
     {
         if (class_exists('SimpleXMLElement')) {
             try {
-                return new \SimpleXMLElement($input);
+                $backup = libxml_disable_entity_loader(true);
+                $result = new \SimpleXMLElement($input);
+                libxml_disable_entity_loader($backup);
+                return $result;
             } catch (\Exception $e) {
                 // Do nothing
             }
diff --git a/Slim/Middleware/Flash.php b/Slim/Middleware/Flash.php
index a1647665be5ecb5e5d54484680a12db564c4501c..835ca01574c85c8907ce9d6ec5023f7c9ec1480e 100644
--- a/Slim/Middleware/Flash.php
+++ b/Slim/Middleware/Flash.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.2.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
@@ -45,7 +45,7 @@ namespace Slim\Middleware;
   * @author     Josh Lockhart
   * @since      1.6.0
   */
-class Flash extends \Slim\Middleware implements \ArrayAccess, \IteratorAggregate
+class Flash extends \Slim\Middleware implements \ArrayAccess, \IteratorAggregate, \Countable
 {
     /**
      * @var array
@@ -198,4 +198,15 @@ class Flash extends \Slim\Middleware implements \ArrayAccess, \IteratorAggregate
 
         return new \ArrayIterator($messages);
     }
+
+    /**
+     * Countable: Count
+     */
+    public function count()
+    {
+        return count($this->getMessages());
+    }
+
+
+
 }
diff --git a/Slim/Middleware/MethodOverride.php b/Slim/Middleware/MethodOverride.php
index f43b41f0bdcd7ccb87728135afb8c9e22b62bce2..3b4c9094179820359130cea2dc09559f4dae6769 100644
--- a/Slim/Middleware/MethodOverride.php
+++ b/Slim/Middleware/MethodOverride.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
@@ -76,10 +76,10 @@ class MethodOverride extends \Slim\Middleware
     public function call()
     {
         $env = $this->app->environment();
-        if (isset($env['X_HTTP_METHOD_OVERRIDE'])) {
+        if (isset($env['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
             // Header commonly used by Backbone.js and others
             $env['slim.method_override.original_method'] = $env['REQUEST_METHOD'];
-            $env['REQUEST_METHOD'] = strtoupper($env['X_HTTP_METHOD_OVERRIDE']);
+            $env['REQUEST_METHOD'] = strtoupper($env['HTTP_X_HTTP_METHOD_OVERRIDE']);
         } elseif (isset($env['REQUEST_METHOD']) && $env['REQUEST_METHOD'] === 'POST') {
             // HTML Form Override
             $req = new \Slim\Http\Request($env);
diff --git a/Slim/Middleware/PrettyExceptions.php b/Slim/Middleware/PrettyExceptions.php
index b67545e19a3d9c4784dc639c1dbeee29c58cea98..bc2deddfdbfe58f42be2f1cba2bf959fb8245609 100644
--- a/Slim/Middleware/PrettyExceptions.php
+++ b/Slim/Middleware/PrettyExceptions.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
@@ -68,6 +68,7 @@ class PrettyExceptions extends \Slim\Middleware
         } catch (\Exception $e) {
             $log = $this->app->getLog(); // Force Slim to append log to env if not already
             $env = $this->app->environment();
+            $env['slim.log'] = $log;
             $env['slim.log']->error($e);
             $this->app->contentType('text/html');
             $this->app->response()->status(500);
diff --git a/Slim/Middleware/SessionCookie.php b/Slim/Middleware/SessionCookie.php
index d13dd94cda4f46715ecc5536fee2a38506e815c7..22e211b402d63f53e9ba40190664f78c4d69a261 100644
--- a/Slim/Middleware/SessionCookie.php
+++ b/Slim/Middleware/SessionCookie.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
@@ -40,15 +40,11 @@ namespace Slim\Middleware;
  * and instead serializes/unserializes the $_SESSION global
  * variable to/from an HTTP cookie.
  *
- * If a secret key is provided with this middleware, the HTTP
- * cookie will be checked for integrity to ensure the client-side
- * cookie is not changed.
- *
  * You should NEVER store sensitive data in a client-side cookie
- * in any format, encrypted or not. If you need to store sensitive
- * user information in a session, you should rely on PHP's native
- * session implementation, or use other middleware to store
- * session data in a database or alternative server-side cache.
+ * in any format, encrypted (with cookies.encrypt) or not. If you
+ * need to store sensitive user information in a session, you should
+ * rely on PHP's native session implementation, or use other middleware
+ * to store session data in a database or alternative server-side cache.
  *
  * Because this class stores serialized session data in an HTTP cookie,
  * you are inherently limited to 4 Kb. If you attempt to store
@@ -68,7 +64,7 @@ class SessionCookie extends \Slim\Middleware
     /**
      * Constructor
      *
-     * @param  array $settings
+     * @param array $settings
      */
     public function __construct($settings = array())
     {
@@ -79,9 +75,6 @@ class SessionCookie extends \Slim\Middleware
             'secure' => false,
             'httponly' => false,
             'name' => 'slim_session',
-            'secret' => 'CHANGE_ME',
-            'cipher' => MCRYPT_RIJNDAEL_256,
-            'cipher_mode' => MCRYPT_MODE_CBC
         );
         $this->settings = array_merge($defaults, $settings);
         if (is_string($this->settings['expires'])) {
@@ -127,14 +120,14 @@ class SessionCookie extends \Slim\Middleware
             session_start();
         }
 
-        $value = \Slim\Http\Util::decodeSecureCookie(
-            $this->app->request()->cookies($this->settings['name']),
-            $this->settings['secret'],
-            $this->settings['cipher'],
-            $this->settings['cipher_mode']
-        );
+        $value = $this->app->getCookie($this->settings['name']);
+
         if ($value) {
-            $_SESSION = unserialize($value);
+            try {
+                $_SESSION = unserialize($value);
+            } catch (\Exception $e) {
+                $this->app->getLog()->error('Error unserializing session cookie value! ' . $e->getMessage());
+            }
         } else {
             $_SESSION = array();
         }
@@ -145,60 +138,71 @@ class SessionCookie extends \Slim\Middleware
      */
     protected function saveSession()
     {
-        $value = \Slim\Http\Util::encodeSecureCookie(
-            serialize($_SESSION),
-            $this->settings['expires'],
-            $this->settings['secret'],
-            $this->settings['cipher'],
-            $this->settings['cipher_mode']
-        );
+        $value = serialize($_SESSION);
+
         if (strlen($value) > 4096) {
             $this->app->getLog()->error('WARNING! Slim\Middleware\SessionCookie data size is larger than 4KB. Content save failed.');
         } else {
-            $this->app->response()->setCookie(
+            $this->app->setCookie(
                 $this->settings['name'],
-                array(
-                    'value' => $value,
-                    'domain' => $this->settings['domain'],
-                    'path' => $this->settings['path'],
-                    'expires' => $this->settings['expires'],
-                    'secure' => $this->settings['secure'],
-                    'httponly' => $this->settings['httponly']
-                )
+                $value,
+                $this->settings['expires'],
+                $this->settings['path'],
+                $this->settings['domain'],
+                $this->settings['secure'],
+                $this->settings['httponly']
             );
         }
-        session_destroy();
+        // session_destroy();
     }
 
     /********************************************************************************
     * Session Handler
     *******************************************************************************/
 
+    /**
+     * @codeCoverageIgnore
+     */
     public function open($savePath, $sessionName)
     {
         return true;
     }
 
+    /**
+     * @codeCoverageIgnore
+     */
     public function close()
     {
         return true;
     }
 
+    /**
+     * @codeCoverageIgnore
+     */
     public function read($id)
     {
         return '';
     }
 
+    /**
+     * @codeCoverageIgnore
+     */
     public function write($id, $data)
     {
         return true;
     }
 
+    /**
+     * @codeCoverageIgnore
+     */
     public function destroy($id)
     {
         return true;
     }
 
+    /**
+     * @codeCoverageIgnore
+     */
     public function gc($maxlifetime)
     {
         return true;
diff --git a/Slim/Route.php b/Slim/Route.php
index d1f7fbf77cdc9d615ec87d65f6c476b8ea5461a1..1136035547881073a8a4c2c1f4bd17aaae728f77 100644
--- a/Slim/Route.php
+++ b/Slim/Route.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.0.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
diff --git a/Slim/Router.php b/Slim/Router.php
index 2f47fb8954042e7e5703bf928aeb4d67a1e61ec5..3dcc64648eddfc63d4714af6e603c3977af15302 100644
--- a/Slim/Router.php
+++ b/Slim/Router.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
@@ -192,8 +192,8 @@ class Router
         }
         $pattern = preg_replace($search, $params, $this->getNamedRoute($name)->getPattern());
 
-        //Remove remnants of unpopulated, trailing optional pattern segments
-        return preg_replace('#\(/?:.+\)|\(|\)#', '', $pattern);
+        //Remove remnants of unpopulated, trailing optional pattern segments, escaped special characters
+        return preg_replace('#\(/?:.+\)|\(|\)|\\\\#', '', $pattern);
     }
 
     /**
diff --git a/Slim/Slim.php b/Slim/Slim.php
index b5d6e8926d275b622b25ec4908ca9768d59baf9a..2a68b6c8906de81c0c214df195f7136fdcad84ed 100644
--- a/Slim/Slim.php
+++ b/Slim/Slim.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE
@@ -49,7 +49,7 @@ class Slim
     /**
      * @const string
      */
-    const VERSION = '2.3.0';
+    const VERSION = '2.3.5';
 
     /**
      * @var \Slim\Helper\Set
@@ -230,13 +230,15 @@ class Slim
     {
         $this->container[$name] = $value;
     }
-    
-    public function __isset($name){
-    	return isset($this->container[$name]);
+
+    public function __isset($name)
+    {
+        return isset($this->container[$name]);
     }
-  
-    public function __unset($name){
-    	unset($this->container[$name]);
+
+    public function __unset($name)
+    {
+        unset($this->container[$name]);
     }
 
     /**
@@ -524,7 +526,7 @@ class Slim
      * declarations in the callback will be prepended by the group(s)
      * that it is in
      *
-     * Accepts the same paramters as a standard route so:
+     * Accepts the same parameters as a standard route so:
      * (pattern, middleware1, middleware2, ..., $callback)
      */
     public function group()
@@ -870,6 +872,7 @@ class Slim
      * the current request will not be available until the next request.
      *
      * @param  string      $name
+     * @param  bool        $deleteIfInvalid
      * @return string|null
      */
     public function getCookie($name, $deleteIfInvalid = true)
@@ -1242,9 +1245,9 @@ class Slim
         set_error_handler(array('\Slim\Slim', 'handleErrors'));
 
         //Apply final outer middleware layers
-        if($this->config('debug')){
-        	//Apply pretty exceptions only in debug to avoid accidental information leakage in production
-        	$this->add(new \Slim\Middleware\PrettyExceptions());
+        if ($this->config('debug')) {
+            //Apply pretty exceptions only in debug to avoid accidental information leakage in production
+            $this->add(new \Slim\Middleware\PrettyExceptions());
         }
 
         //Invoke middleware and application stack
@@ -1274,8 +1277,10 @@ class Slim
             }
         }
 
-        //Send body
-        echo $body;
+        //Send body, but only if it isn't a HEAD request
+        if (!$this->request->isHead()) {
+            echo $body;
+        }
 
         restore_error_handler();
     }
@@ -1384,6 +1389,6 @@ class Slim
     protected function defaultError($e)
     {
         $this->getLog()->error($e);
-        echo self::generateTemplateMarkup('Error', '<p>A website error has occured. The website administrator has been notified of the issue. Sorry for the temporary inconvenience.</p>');
+        echo self::generateTemplateMarkup('Error', '<p>A website error has occurred. The website administrator has been notified of the issue. Sorry for the temporary inconvenience.</p>');
     }
 }
diff --git a/Slim/View.php b/Slim/View.php
index e5be0abe3e69e57431e14777c4d1251520a94f94..c6c435a7f4a417ab1f7c876739353b82002ea74d 100644
--- a/Slim/View.php
+++ b/Slim/View.php
@@ -6,7 +6,7 @@
  * @copyright   2011 Josh Lockhart
  * @link        http://www.slimframework.com
  * @license     http://www.slimframework.com/license
- * @version     2.3.0
+ * @version     2.3.5
  * @package     Slim
  *
  * MIT LICENSE