8000 Added more details to the explanation · symfony/symfony-docs@cc0337c · GitHub
[go: up one dir, main page]

Skip to content

Commit cc0337c

Browse files
committed
Added more details to the explanation
1 parent d4049ed commit cc0337c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

testing.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,10 @@ You can also override HTTP headers on a per request basis::
10311031

10321032
.. caution::
10331033

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``.
10351038

10361039
.. tip::
10371040

@@ -1128,3 +1131,4 @@ Learn more
11281131
.. _`$_SERVER`: https://www.php.net/manual/en/reserved.variables.server.php
11291132
.. _`data providers`: https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.data-providers
11301133
.. _`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

0 commit comments

Comments
 (0)
0