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

Commit3c76623

Browse files
committed
feature#5008 Added a note about how to enable http_method_override for caching kernels (javiereguiluz)
This PR was squashed before being merged into the 2.3 branch (closes#5008).Discussion----------Added a note about how to enable http_method_override for caching kernels| Q | A| ------------- | ---| Doc fix? | no| New docs? | yes| Applies to | 2.3+| Fixed tickets |#3569Commits-------e719510 Added a note about how to enable http_method_override for caching kernels
2 parents1ee04ba +e719510 commit3c76623

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

‎book/http_cache.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,24 @@ kernel::
166166
The caching kernel will immediately act as a reverse proxy - caching responses
167167
from your application and returning them to the client.
168168

169+
..caution::
170+
171+
By default, a kernel based on the cache ignores the ``framework.http_method_override``
172+
option, which could lead to errors when using ``PUT``, ``DELETE`` and ``PURGE``
173+
methods in HTTP requests.
174+
175+
Invoke the ``enableHttpMethodParameterOverride()`` method before creating the
176+
``Request`` object in order to take this option into account::
177+
178+
// web/app.php
179+
180+
// ...
181+
$kernel = new AppCache($kernel);
182+
183+
Request::enableHttpMethodParameterOverride(); // <-- add this line
184+
$request = Request::createFromGlobals();
185+
// ...
186+
169187
..tip::
170188

171189
The cache kernel has a special ``getLog()`` method that returns a string

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp