File tree Expand file tree Collapse file tree 4 files changed +5
-9
lines changed
lib/protocol/rack/adapter Expand file tree Collapse file tree 4 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,11 @@ def unwrap_headers(headers, env)
7474 # @parameter request [Protocol::HTTP::Request] The incoming request.
7575 # @parameter env [Hash] The rack `env`.
7676 def unwrap_request ( request , env )
77+ # The request protocol, either from the upgrade header or the HTTP/2 pseudo header of the same name.
78+ if protocol = request . protocol
79+ env [ RACK_PROTOCOL ] = protocol
80+ end
81+
7782 if content_type = request . headers . delete ( "content-type" )
7883 env [ CGI ::CONTENT_TYPE ] = content_type
7984 end
Original file line number Diff line number Diff line change @@ -37,9 +37,6 @@ def make_environment(request)
3737 RACK_ERRORS => $stderr,
3838 RACK_LOGGER => self . logger ,
3939
40- # The request protocol, either from the upgrade header or the HTTP/2 pseudo header of the same name.
41- RACK_PROTOCOL => request . protocol ,
42-
4340 # The HTTP request method, such as “GET” or “POST”. This cannot ever be an empty string, and so is always required.
4441 CGI ::REQUEST_METHOD => request . method ,
4542
Original file line number Diff line number Diff line change @@ -30,9 +30,6 @@ def make_environment(request)
3030 RACK_ERRORS => $stderr,
3131 RACK_LOGGER => self . logger ,
3232
33- # The request protocol, either from the upgrade header or the HTTP/2 pseudo header of the same name.
34- RACK_PROTOCOL => request . protocol ,
35-
3633 # The response finished callbacks:
3734 RACK_RESPONSE_FINISHED => [ ] ,
3835
Original file line number Diff line number Diff line change @@ -21,9 +21,6 @@ def make_environment(request)
2121 RACK_ERRORS => $stderr,
2222 RACK_LOGGER => self . logger ,
2323
24- # The request protocol, either from the upgrade header or the HTTP/2 pseudo header of the same name.
25- RACK_PROTOCOL => request . protocol ,
26-
2724 # The response finished callbacks:
2825 RACK_RESPONSE_FINISHED => [ ] ,
2926
You can’t perform that action at this time.
0 commit comments