Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release4.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrife committed Feb 11, 2013
2 parents a8429b3 + 66ad9d5 commit e4f2e77
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/right_http_connection.rb
Expand Up @@ -418,13 +418,14 @@ def request(request_params, &block)
current_params = @params.merge(request_params)
exception = get_param(:exception, current_params) || RuntimeError

# Re-establish the connection if any of auth params has changed
same_auth_params_as_before = SECURITY_PARAMS.select do |param|
request_params[param] != get_param(param)
end.empty?

# We save the offset here so that if we need to retry, we can return the file pointer to its initial position
mypos = get_fileptr_offset(current_params)
loop do
# Re-establish the connection if any of auth params has changed
same_auth_params_as_before = SECURITY_PARAMS.select do |param|
request_params[param] != get_param(param)
end.empty?

current_params[:protocol] ||= (current_params[:port] == 443 ? 'https' : 'http')
# (re)open connection to server if none exists or params has changed
Expand Down Expand Up @@ -454,8 +455,8 @@ def request(request_params, &block)
unless @http &&
@http.started? &&
same_server_as_before
start(current_params)
same_auth_params_as_before = true
start(current_params)
end

# Detect if the body is a streamable object like a file or socket. If so, stream that
Expand Down

1 comment on commit e4f2e77

@flexera-ci
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RS-COMPLIANCE: COMPLIANCE-AUTHORIZATION-PASS Build: #19399(2013-05-02_05-42-37), repo: right_http_connection, branch/tag: release4.8, sha: e4f2e77, status: PASS, reason: Master/release branch and pusher is on the whitelist.

Please sign in to comment.