Skip to content

Commit d0ab719

Browse files
tamcnicolas-grekas
authored andcommitted
Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
The current documentation points to https://tools.ietf.org/html/rfc7231#section-4.2.3. The spec says: "this specification defines GET, HEAD, and POST as cacheable, although the overwhelming majority of cache implementations only support GET and HEAD.". This fix to the documentation clarifies that Symfony follows majority (excluding POST) rather than the spec (including POST).
1 parent fdc6033 commit d0ab719

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,7 @@ public function isMethodSafe(/* $andCacheable = true */)
14751475
*
14761476
* @see https://tools.ietf.org/html/rfc7231#section-4.2.3
14771477
*
1478-
* @return bool
1478+
* @return bool True for GET and HEAD, false otherwise
14791479
*/
14801480
public function isMethodCacheable()
14811481
{

0 commit comments

Comments
 (0)