Browse files

Merge remote-tracking branch 'origin/release4.7'

  • Loading branch information...
2 parents a8429b3 + 66ad9d5 commit e4f2e77522fd065b9620c1e71538b70e3bc78460 @danielrife danielrife committed Feb 11, 2013
Showing with 6 additions and 5 deletions.
  1. +6 −5 lib/right_http_connection.rb
View
11 lib/right_http_connection.rb
@@ -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
@@ -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

1 comment on commit e4f2e77

@rightscale-ci

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.