@@ -15,19 +15,19 @@ def call(env)
15
15
matcher , url = get_matcher_and_url rackreq . fullpath
16
16
return @app . call ( env ) if matcher . nil?
17
17
18
- uri = get_uri ( url , matcher , rackreq . fullpath )
18
+ uri = get_uri ( url , matcher , rackreq . fullpath )
19
19
headers = Rack ::Utils ::HeaderHash . new
20
20
env . each { |key , value |
21
21
if key =~ /HTTP_(.*)/
22
22
headers [ $1] = value
23
23
end
24
24
}
25
- headers [ 'HOST' ] = uri . host if @opts [ :preserve_host ]
26
-
27
- session = Net ::HTTP . new ( uri . host , uri . port )
28
- session . use_ssl = ( uri . scheme == 'https' )
29
- session . verify_mode = OpenSSL ::SSL ::VERIFY_NONE
30
- session . start { |http |
25
+ headers [ 'HOST' ] = uri . host if @opts [ :preserve_host ]
26
+
27
+ session = Net ::HTTP . new ( uri . host , uri . port )
28
+ session . use_ssl = ( uri . scheme == 'https' )
29
+ session . verify_mode = OpenSSL ::SSL ::VERIFY_NONE
30
+ session . start { |http |
31
31
m = rackreq . request_method
32
32
case m
33
33
when "GET" , "HEAD" , "DELETE" , "OPTIONS" , "TRACE"
@@ -52,7 +52,7 @@ def call(env)
52
52
[ res . code , create_response_headers ( res ) , [ body ] ]
53
53
}
54
54
end
55
-
55
+
56
56
private
57
57
58
58
def get_matcher_and_url path
0 commit comments