forked from soveran/cuba
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make HTTP version handling compatible with Rack 3 SPEC
Add RodaRequest#http_version for determining the HTTP version in use. Use this in the chunked, common_logger, and status_303 plugins. For the status_303 plugin, allow use of the 303 status for HTTP/2 and higher versions. Only call super (302) for HTTP/1.0 and HTTP/0.9 versions. For Rack 3 compatibility, prefer SERVER_PROTOCOL since it is required to be set in Rack 3. Otherwise, prefer HTTP_VERSION, since that is what is used previously. Puma, the most common Ruby webserver, sets HTTP_VERSION accurately, but SERVER_PROTOCOL is fixed at 1.1, so switching to always using SERVER_PROTOCOL could result in incorrect behavior when using Puma (I'm sure Puma will fix this in their changes to support Rack 3).
- Loading branch information
1 parent
88b6ad4
commit 50f0ddf
Showing
7 changed files
with
47 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters