Skip to content

Commit

Permalink
change connopt.https when redirect (#335)
Browse files Browse the repository at this point in the history
Co-authored-by: a.sadounikau <sadounikau.a@profitero.com>
  • Loading branch information
leksito and a.sadounikau authored Mar 20, 2020
1 parent 907f467 commit 3a6712b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/em-http/http_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ def redirect(client, new_location)
conn = HttpConnection.new
client.conn = conn
conn.connopts = @connopts
conn.connopts.https = new_location.scheme == "https"
conn.uri = client.req.uri
conn.activate_connection(client)

Expand Down
1 change: 1 addition & 0 deletions lib/em-http/http_connection_options.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class HttpConnectionOptions
attr_reader :host, :port, :tls, :proxy, :bind, :bind_port
attr_reader :connect_timeout, :inactivity_timeout
attr_writer :https

def initialize(uri, options)
@connect_timeout = options[:connect_timeout] || 5 # default connection setup timeout
Expand Down

0 comments on commit 3a6712b

Please sign in to comment.