diff options
author | Tawan Sierek <tawan.sierek@gmail.com> | 2016-01-29 21:01:33 +0100 |
---|---|---|
committer | Tawan Sierek <tawan.sierek@gmail.com> | 2016-01-29 22:11:16 +0100 |
commit | 349f187f58491f2c2ef929ec0b46d78d4e888e85 (patch) | |
tree | ea676a376d8090ac858a7422b7e49d92d7f96c5e /actionview/RUNNING_UNIT_TESTS.rdoc | |
parent | e6d0d4b1ae1970f3c4379f5bc2c4147a227221c3 (diff) | |
download | rails-349f187f58491f2c2ef929ec0b46d78d4e888e85.tar.gz rails-349f187f58491f2c2ef929ec0b46d78d4e888e85.tar.bz2 rails-349f187f58491f2c2ef929ec0b46d78d4e888e85.zip |
Add additional documentation on Headers#[] [ci skip]
Issue #16519 covers confusion potentially caused by how HTTP
headers, that contain underscores in their names, are retrieved
through `ActionDispatch::Http::Headers#[]`.
This confusion has its origin in how a CGI maps HTTP header names
to variable names. Even though underscores in header names
are rarely encountered, they are valid according to RFC822 [1].
Nonetheless CGI like variable names, as requested by the Rack
specfication, will only contain underscores and therefore the
original header name cannot be recovered after the Rack server passed
on the environemnt hash. Please, see also the disscussion on
StackOverflow [2], which also links to an explaination in the
nginx documentation [3].
[1] http://www.ietf.org/rfc/rfc822.txt
[2] http://stackoverflow.com/questions/22856136/why-underscores-are-forbidden-in-http-header-names
[3] https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#missing-disappearing-http-headers
Diffstat (limited to 'actionview/RUNNING_UNIT_TESTS.rdoc')
0 files changed, 0 insertions, 0 deletions