mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 08:49:06 +08:00
DEV: Don't mutate Excon.defaults[:middlewares]
(#16151)
`Excon.defaults` and its middlewares array are constants that we shouldn't mutate everytime `FinalDestination#resolve` is called.
This commit is contained in:
parent
892f7e0506
commit
9b5cc1424f
|
@ -202,7 +202,7 @@ class FinalDestination
|
|||
end
|
||||
|
||||
headers = request_headers
|
||||
middlewares = Excon.defaults[:middlewares]
|
||||
middlewares = Excon.defaults[:middlewares].dup
|
||||
middlewares << Excon::Middleware::Decompress if @http_verb == :get
|
||||
|
||||
request_start_time = Time.now
|
||||
|
|
Loading…
Reference in New Issue
Block a user