aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/header_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-2/+2
|
* improve error message when include assertions failMichael Grosser2016-09-161-2/+2
| | | | | | assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong
* Missing key should throw KeyErroreileencodes2016-08-261-0/+6
| | | | | | It should not throw a NameError, but should throw a KeyError. Fixes #26278
* Add three new rubocop rulesRafael Mendonça França2016-08-161-15/+15
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* applies new string literal convention in actionpack/testXavier Noria2016-08-061-9/+9
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Introduce `Headers#add`. Move `Response#add_header` upstream.Jeremy Daer2015-10-031-0/+18
| | | | | | | * Introduce `ActionDispatch::Http::Headers#add` to add a value to a multivalued header. * Move `Response#add_header` upstream: https://github.com/rack/rack/pull/957 * Match upstream `Response#have_header?` -> `#has_header?` name change.
* pass a request object to the headers objectAaron Patterson2015-08-211-1/+1
|
* move header allocation to a helper methodAaron Patterson2015-08-211-5/+9
| | | | | I'm going to change the constructor, so it's easier to do it in one place.
* HTTP::Headers#key? correctly convertsschneems2014-05-071-0/+2
| | | | | | | | | | | | | | | Previously if you were looking for a given key, the header may incorrectly tell you that it did not exist even though it would return a valid value: ```ruby env = { "CONTENT_TYPE" => "text/plain" } headers = ActionDispatch::Http::Headers.new(env) headers["Content-Type"] # => "text/plain" headers.key?("Content-Type") # => false ``` This PR fixes that behavior by converting the key before checking for presence
* `Http::Headers` directly modifies the passed environment.Yves Senn2013-03-151-6/+16
| | | | | | | | | The env hash passed to `Http::Headers#new` must be in env format. Also be aware that the passed hash is modified directly. docs and test-cases for setting headers/env in functional tests. Follow up to #9700.
* `Http::Headers` respects dotted env vars, symbols, headers with numbers.Yves Senn2013-03-131-0/+27
|
* allow headers and env to be passed in `IntegrationTest`.Yves Senn2013-03-131-1/+44
| | | | Closes #6513.
* refactor, `Http::Headers` stores headers in env notationYves Senn2013-03-131-12/+21
| | | | | Also: cleanup, use consistent syntax for `Http::Header` and test.
* Http::Headers respects headers that are not prefixed with HTTP_Yves Senn2013-03-131-6/+13
|
* add test for fetch with a blockAaron Patterson2012-10-181-0/+4
|
* prefer composition over inheritenceAaron Patterson2012-10-181-0/+16
|
* Enable ActionDispatch::Http::Headers to support fetchMark Turner2012-05-021-0/+5
|
* Move dispatch related tests into test/dispatchJoshua Peek2009-01-281-0/+16