This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/HttpFoundation
Fabien Potencier bb5075d820 [HttpFoundation] prevented Response headers to be sent twice
This change allows for more flexibility if the developer wants to flush
the Response content early (the drawback being that Response listeners
won't be able to tweak the HTTP headers anymore).

There is another benefit: avoid the infamous
"Fatal error: Exception thrown without a stack frame in Unknown on line 0".

Here is a small scenario when this can happen (thanks dtee for identifying this issue):

* Call flush() in controller to output html early, then throw exception
* ExceptionHandler triggers handle() function and return new Response object to output...
* Because the header is sent (flush() call in Controller), php's E_WARNING error get raised, which gets handled by ErrorHandler->handle() and it throws new ErrorException()
* PHP fatals to prevent Exception loop: "Fatal error: Exception thrown without a stack frame in Unknown on line 0"
2011-07-07 07:34:35 +02:00
..
File [Validator] Consider the ini directive 'upload_max_filesize' while validating an uploaded file (fixes GH-1441) 2011-07-05 20:05:50 +02:00
SessionStorage [HttpFoundation] tweaked previous merge 2011-07-04 16:26:19 +02:00
ApacheRequest.php [HttpFoundation] fixed a small bug on Windows 2011-03-17 12:28:29 +01:00
Cookie.php [HttpFoundation] added phpdoc + exception fix 2011-06-10 08:59:49 +02:00
FileBag.php fixed CS 2011-06-08 12:12:55 +02:00
HeaderBag.php removed usage of preg_match with the 'e' modifier 2011-07-05 19:49:27 +02:00
LICENSE added LICENSE files for the subtree repositories 2011-02-22 18:58:15 +01:00
ParameterBag.php [HttpFoundation] fixed php doc 2011-05-10 20:24:58 +02:00
RedirectResponse.php replaced symfony-project.org by symfony.com 2011-03-06 12:40:06 +01:00
Request.php made HTTP headers coming from proxies non-trusted by default 2011-07-05 19:49:36 +02:00
RequestMatcher.php [HttpFoundation] simplified code 2011-06-14 16:08:07 +02:00
RequestMatcherInterface.php replaced symfony-project.org by symfony.com 2011-03-06 12:40:06 +01:00
Response.php [HttpFoundation] prevented Response headers to be sent twice 2011-07-07 07:34:35 +02:00
ResponseHeaderBag.php fixed CS 2011-06-08 12:16:48 +02:00
ServerBag.php [HttpFoundation] added missing CONTENT_TYPE and CONTENT_LENGTH to the Request headers (these two headers are not prefixes with HTTP_ -- as per the CGI/1.1 spec, closes #1234) 2011-06-08 11:04:41 +02:00
Session.php [HttpFoundation] Small optimization of Session flash handling 2011-06-20 11:06:27 +02:00