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)
74
74
# @parameter request [Protocol::HTTP::Request] The incoming request.
75
75
# @parameter env [Hash] The rack `env`.
76
76
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
+
77
82
if content_type = request . headers . delete ( "content-type" )
78
83
env [ CGI ::CONTENT_TYPE ] = content_type
79
84
end
Original file line number Diff line number Diff line change @@ -37,9 +37,6 @@ def make_environment(request)
37
37
RACK_ERRORS => $stderr,
38
38
RACK_LOGGER => self . logger ,
39
39
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
-
43
40
# The HTTP request method, such as “GET” or “POST”. This cannot ever be an empty string, and so is always required.
44
41
CGI ::REQUEST_METHOD => request . method ,
45
42
Original file line number Diff line number Diff line change @@ -30,9 +30,6 @@ def make_environment(request)
30
30
RACK_ERRORS => $stderr,
31
31
RACK_LOGGER => self . logger ,
32
32
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
-
36
33
# The response finished callbacks:
37
34
RACK_RESPONSE_FINISHED => [ ] ,
38
35
Original file line number Diff line number Diff line change @@ -21,9 +21,6 @@ def make_environment(request)
21
21
RACK_ERRORS => $stderr,
22
22
RACK_LOGGER => self . logger ,
23
23
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
-
27
24
# The response finished callbacks:
28
25
RACK_RESPONSE_FINISHED => [ ] ,
29
26
You can’t perform that action at this time.
0 commit comments