File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1031,7 +1031,10 @@ You can also override HTTP headers on a per request basis::
1031
1031
1032
1032
.. caution ::
1033
1033
1034
- Every custom header must have `HTTP_ ` prefix.
1034
+ The name of your custom headers must follow the syntax defined in the
1035
+ `section 4.1.18 of RFC 3875 `_: replace ``-`` by ``_ ``, transform it into
1036
+ uppercase and prefix the result with ``HTTP_ ``. For example, if your
1037
+ header name is ``X-Session-Token ``, pass ``HTTP_X_SESSION_TOKEN ``.
1035
1038
1036
1039
.. tip ::
1037
1040
@@ -1128,3 +1131,4 @@ Learn more
1128
1131
.. _`$_SERVER` : https://www.php.net/manual/en/reserved.variables.server.php
1129
1132
.. _`data providers` : https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.data-providers
1130
1133
.. _`code coverage analysis` : https://phpunit.readthedocs.io/en/9.1/code-coverage-analysis.html
1134
+ .. _`section 4.1.18 of RFC 3875` : https://tools.ietf.org/html/rfc3875#section-4.1.18
You can’t perform that action at this time.
0 commit comments