8000 changed comparison on the request method to use the isMethod() method · sam57/symfony@58cb6f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 58cb6f5

Browse files
committed
changed comparison on the request method to use the isMethod() method
1 parent 0608404 commit 58cb6f5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/HttpFoundation/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public function prepare(Request $request)
231231
$headers->remove('Content-Length');
232232
}
233233

234-
if ('HEAD' === $request->getMethod()) {
234+
if ($request->isMethod('HEAD')) {
235235
// cf. RFC2616 14.13
236236
$length = $headers->get('Content-Length');
237237
$this->setContent(null);

src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ protected function store(Request $request, Response $response)
580580
*/
581581
private function restoreResponseBody(Request $request, Response $response)
582582
{
583-
if ('HEAD' === $request->getMethod() || 304 === $response->getStatusCode()) {
583+
if ($request->isMethod('HEAD') || 304 === $response->getStatusCode()) {
584584
$response->setContent(null);
585585
$response->headers->remove('X-Body-Eval');
586586
$response->headers->remove('X-Body-File');

0 commit comments

Comments
 (0)
0