Changeset 1593
- Timestamp:
- 07/23/05 22:47:24 (3 years ago)
- Files:
-
- trunk/lib/soap/streamHandler.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/soap/streamHandler.rb
r1583 r1593 35 35 RUBY_VERSION_STRING = "ruby #{ RUBY_VERSION } (#{ RUBY_RELEASE_DATE }) [#{ RUBY_PLATFORM }]" 36 36 37 RETRYABLE = (Client == HTTPAccess2::Client) 38 37 39 class ConnectionData 38 40 attr_accessor :send_string … … 162 164 @wiredump_dev << "Wire dump:\n\n" if @wiredump_dev 163 165 begin 164 res = @client.post(endpoint_url, send_string, extra) 166 retry_count = 0 167 while true 168 res = @client.post(endpoint_url, send_string, extra) 169 if RETRYABLE and HTTP::Status.redirect?(res.status) 170 retry_count += 1 171 if retry_count >= 10 172 raise HTTPStreamError.new("redirect count exceeded") 173 end 174 endpoint_url = res.header["location"][0] 175 puts "redirected to #{endpoint_url}" if $DEBUG 176 else 177 break 178 end 179 end 165 180 rescue 166 181 @client.reset(endpoint_url)