Skip to content

Commit d49ed1b

Browse files
Add docs for WSGIMapHEADToGET directive.
1 parent 3d7a321 commit d49ed1b

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
==================
2+
WSGIMapHEADToGET
3+
==================
4+
5+
:Description: Enable/disable mapping of HEAD request to GET.
6+
:Syntax: ``WSGIMapHEADToGET On|Off|Auto``
7+
:Default: ``WSGIMapHEADToGET Auto``
8+
:Context: server config, virtual host, directory, .htaccess
9+
10+
The ``WSGIMapHEADToGET`` directive controls the behaviour of automatically
11+
mapping any ``HEAD`` request to a ``GET`` request when an Apache output filter
12+
is registered that may want to see the complete response in order to generate
13+
correct response headers.
14+
15+
The directive can be set to be either ``Auto`` (the default), ``On`` which
16+
will always map a ``HEAD`` to ``GET`` even if no output filters detected and
17+
``Off`` to always preserve the original request method type.
18+
19+
The directive may be required where a WSGI application tries to optimize and
20+
avoid doing work for a ``HEAD`` request by not actually generating a response
21+
so that complete response headers can still be generated. By doing this the
22+
WSGI application can break Apache filters for caching, so the mapping of
23+
``HEAD`` to ``GET`` can be required to avoid problems.

docs/configuration.rst

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Configuration
1717
configuration-directives/WSGIDestroyInterpreter
1818
configuration-directives/WSGIImportScript
1919
configuration-directives/WSGILazyInitialization
20+
configuration-directives/WSGIMapHEADToGET
2021
configuration-directives/WSGIPassAuthorization
2122
configuration-directives/WSGIProcessGroup
2223
configuration-directives/WSGIPythonEggs

0 commit comments

Comments
 (0)