merged branch fabpot/response-protocol (PR #5954)
This PR was merged into the 2.1 branch.
Commits
-------
e34fb41
[HttpFoundation] moved the HTTP protocol check from StreamedResponse to Response (closes #5937)
Discussion
----------
[HttpFoundation] moved the HTTP protocol check from StreamedResponse to Response (closes #5937)
This commit is contained in:
commit
ae61d354c9
@ -240,6 +240,11 @@ class Response
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fix protocol
|
||||||
|
if ('HTTP/1.0' != $request->server->get('SERVER_PROTOCOL')) {
|
||||||
|
$this->setProtocolVersion('1.1');
|
||||||
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,10 +76,6 @@ class StreamedResponse extends Response
|
|||||||
*/
|
*/
|
||||||
public function prepare(Request $request)
|
public function prepare(Request $request)
|
||||||
{
|
{
|
||||||
if ('HTTP/1.0' != $request->server->get('SERVER_PROTOCOL')) {
|
|
||||||
$this->setProtocolVersion('1.1');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->headers->set('Cache-Control', 'no-cache');
|
$this->headers->set('Cache-Control', 'no-cache');
|
||||||
|
|
||||||
return parent::prepare($request);
|
return parent::prepare($request);
|
||||||
|
Reference in New Issue
Block a user