Security update for Core, with self-updated composer
[yaffs-website] / vendor / zendframework / zend-diactoros / src / Server.php
index 768d7f38059145a822af11e2d017a8bbd74080e8..dfe84004ecc4cdaaeebcb931b5e8559dad13104e 100644 (file)
@@ -1,9 +1,7 @@
 <?php
 /**
- * Zend Framework (http://framework.zend.com/)
- *
- * @see       http://github.com/zendframework/zend-diactoros for the canonical source repository
- * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com)
+ * @see       https://github.com/zendframework/zend-diactoros for the canonical source repository
+ * @copyright Copyright (c) 2015-2017 Zend Technologies USA Inc. (http://www.zend.com)
  * @license   https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License
  */
 
@@ -150,24 +148,18 @@ class Server
      * If provided a $finalHandler, that callable will be used for
      * incomplete requests.
      *
-     * Output buffering is enabled prior to invoking the attached
-     * callback; any output buffered will be sent prior to any
-     * response body content.
-     *
      * @param null|callable $finalHandler
      */
     public function listen(callable $finalHandler = null)
     {
         $callback = $this->callback;
 
-        ob_start();
-        $bufferLevel = ob_get_level();
-
         $response = $callback($this->request, $this->response, $finalHandler);
         if (! $response instanceof ResponseInterface) {
             $response = $this->response;
         }
-        $this->getEmitter()->emit($response, $bufferLevel);
+
+        $this->getEmitter()->emit($response);
     }
 
     /**