aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2015-08-22 16:35:13 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2015-08-22 16:35:13 -0300
commit4115a12da1409c753c747fd4bab6e612c0c6e51a (patch)
treee7f6453c80766aec950b163fa3ddc3e3c5a894b6 /guides
parentf15a2609cb31d9f88c72d612b3aef186470f2dab (diff)
parent3ec3ac619274d9e759f95e6c003895429e988646 (diff)
downloadrails-4115a12da1409c753c747fd4bab6e612c0c6e51a.tar.gz
rails-4115a12da1409c753c747fd4bab6e612c0c6e51a.tar.bz2
rails-4115a12da1409c753c747fd4bab6e612c0c6e51a.zip
Merge pull request #20757 from bquorning/http-status-codes-changed-in-rack
Rack changed their status codes to IETF RFC 7231
Diffstat (limited to 'guides')
-rw-r--r--guides/source/4_2_release_notes.md11
-rw-r--r--guides/source/layouts_and_rendering.md7
2 files changed, 14 insertions, 4 deletions
diff --git a/guides/source/4_2_release_notes.md b/guides/source/4_2_release_notes.md
index 684bd286bc..8a59007420 100644
--- a/guides/source/4_2_release_notes.md
+++ b/guides/source/4_2_release_notes.md
@@ -227,6 +227,17 @@ restore the old behavior.
If you do this, be sure to configure your firewall properly such that only
trusted machines on your network can access your development server.
+### Changed status option symbols for `render`
+
+Due to a [change in Rack](https://github.com/rack/rack/commit/be28c6a2ac152fe4adfbef71f3db9f4200df89e8), the symbols that the `render` method accepts for the `:status` option have changed:
+
+- 306: `:reserved` has been removed.
+- 413: `:request_entity_too_large` has been renamed to `:payload_too_large`.
+- 414: `:request_uri_too_long` has been renamed to `:uri_too_long`.
+- 416: `:requested_range_not_satisfiable` has been renamed to `:range_not_satisfiable`.
+
+Keep in mind that if calling `render` with an unknown symbol, the response status will default to 500.
+
### HTML Sanitizer
The HTML sanitizer has been replaced with a new, more robust, implementation
diff --git a/guides/source/layouts_and_rendering.md b/guides/source/layouts_and_rendering.md
index 94cd7297e2..b425eb126a 100644
--- a/guides/source/layouts_and_rendering.md
+++ b/guides/source/layouts_and_rendering.md
@@ -360,7 +360,6 @@ Rails understands both numeric status codes and the corresponding symbols shown
| | 303 | :see_other |
| | 304 | :not_modified |
| | 305 | :use_proxy |
-| | 306 | :reserved |
| | 307 | :temporary_redirect |
| | 308 | :permanent_redirect |
| **Client Error** | 400 | :bad_request |
@@ -376,10 +375,10 @@ Rails understands both numeric status codes and the corresponding symbols shown
| | 410 | :gone |
| | 411 | :length_required |
| | 412 | :precondition_failed |
-| | 413 | :request_entity_too_large |
-| | 414 | :request_uri_too_long |
+| | 413 | :payload_too_large |
+| | 414 | :uri_too_long |
| | 415 | :unsupported_media_type |
-| | 416 | :requested_range_not_satisfiable |
+| | 416 | :range_not_satisfiable |
| | 417 | :expectation_failed |
| | 422 | :unprocessable_entity |
| | 423 | :locked |