1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/test
Masaru Nomura bddf83bfcf Add tests for 1xx, 204 and 304 responses to response_test.rb
In response_test.rb, we haven't had a test to make sure that

1) these responses don't have a message-body as described in RFC7231[1]

2) 1xx and 204 responses must not have a Content-Length header field
   as described in RFC7230-section3.3.2[2]

[1] https://tools.ietf.org/html/rfc7231
[2] https://tools.ietf.org/html/rfc7230#section-3.3.2

Even though our implementation doesn't allow users to send
a Content-Length header field in a 304 response, sending the
header field is valid as mentioned in RFC7230-section3.3.2[2].
So I've decided not to test whether or not a 304 response has
the header.

The citation from the section is as follows;
```
A server MAY send a Content-Length header field in a 304 (Not
Modified) response to a conditional GET request (Section 4.1 of
[RFC7232]); a server MUST NOT send Content-Length in such a response
unless its field-value equals the decimal number of octets that would
have been sent in the payload body of a 200 (OK) response to the same
request.
```
2016-07-09 19:37:06 +09:00
..
abstract Revert "ActionController::Base#process() now only takes an action name" 2015-10-29 16:18:27 -07:00
assertions Support for unified Integer class in Ruby 2.4+ 2016-05-18 21:58:51 -07:00
controller Merge pull request #24177 from vipulnsward/rename-test 2016-07-01 23:53:34 -03:00
dispatch Add tests for 1xx, 204 and 304 responses to response_test.rb 2016-07-09 19:37:06 +09:00
fixtures Fix adding implicitly rendered template digests to ETags 2016-06-28 11:59:41 -07:00
journey Deprecate :controller and :action path parameters 2016-03-01 08:48:53 +00:00
lib/controller Removing unused fake models 2014-09-07 22:51:14 -03:00
routing Remove deprecate *_path helpers in email views 2015-01-04 11:58:42 -03:00
tmp
abstract_unit.rb More Action Pack abstract_unit cleanup (#25211) 2016-05-31 11:21:30 -04:00