Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf7ef7c0

Browse files
committed
[HTTP Cache] Validation model: Fix header name
1 parentfc0aa8b commitf7ef7c0

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

‎book/http_cache.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,9 +572,16 @@ To see a simple implementation, generate the ETag as the md5 of the content::
572572
}
573573

574574
The:method:`Symfony\\Component\\HttpFoundation\\Response::isNotModified`
575-
method compares the ``ETag`` sent with the ``Request`` with the one set
576-
on the ``Response``. If the two match, the method automatically sets the
577-
``Response`` status code to 304.
575+
method compares the ``If-None-Match`` sent with the ``Request`` with the
576+
``ETag`` header set on the ``Response``. If the two match, the method
577+
automatically sets the ``Response`` status code to 304.
578+
579+
..note::
580+
581+
The ``If-None-Match`` request header equals the ``ETag`` header of the
582+
last response sent to the client for the particular resource. This is
583+
how the client and server communicate with each other and decide whether
584+
or not the resource has been updated since it was cached.
578585

579586
This algorithm is simple enough and very generic, but you need to create the
580587
whole ``Response`` before being able to compute the ETag, which is sub-optimal.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp