1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack
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
..
bin
lib Add a test case for verifying cookie_only is set even if user tries to set it false 2016-07-07 22:20:40 +05:30
test Add tests for 1xx, 204 and 304 responses to response_test.rb 2016-07-09 19:37:06 +09:00
actionpack.gemspec Do not allow rack pre releases 2016-06-30 15:12:08 -03:00
CHANGELOG.md Start Rails 5.1 development 🎉 2016-05-10 03:46:56 -03:00
MIT-LICENSE Update copyright notices to 2016 [ci skip] 2015-12-31 18:27:19 +02:00
Rakefile Remove package:clean task 2016-05-24 13:11:28 -04:00
README.rdoc

= Action Pack -- From request to response

Action Pack is a framework for handling and responding to web requests. It
provides mechanisms for *routing* (mapping request URLs to actions), defining
*controllers* that implement actions, and generating responses by rendering
*views*, which are templates of various formats. In short, Action Pack
provides the view and controller layers in the MVC paradigm.

It consists of several modules:

* Action Dispatch, which parses information about the web request, handles
  routing as defined by the user, and does advanced processing related to HTTP
  such as MIME-type negotiation, decoding parameters in POST, PATCH, or PUT bodies,
  handling HTTP caching logic, cookies and sessions.

* Action Controller, which provides a base controller class that can be
  subclassed to implement filters and actions to handle requests. The result
  of an action is typically content generated from views.

With the Ruby on Rails framework, users only directly interface with the
Action Controller module. Necessary Action Dispatch functionality is activated
by default and Action View rendering is implicitly triggered by Action
Controller. However, these modules are designed to function on their own and
can be used outside of Rails.


== Download and installation

The latest version of Action Pack can be installed with RubyGems:

  $ gem install actionpack

Source code can be downloaded as part of the Rails project on GitHub

* https://github.com/rails/rails/tree/master/actionpack


== License

Action Pack is released under the MIT license:

* http://www.opensource.org/licenses/MIT


== Support

API documentation is at

* http://api.rubyonrails.org

Bug reports can be filed for the Ruby on Rails project here:

* https://github.com/rails/rails/issues

Feature requests should be discussed on the rails-core mailing list here:

* https://groups.google.com/forum/?fromgroups#!forum/rubyonrails-core