Skip to content

Instantly share code, notes, and snippets.

@siannopollo
Created February 4, 2010 22:49
Show Gist options
  • Save siannopollo/295225 to your computer and use it in GitHub Desktop.
Save siannopollo/295225 to your computer and use it in GitHub Desktop.
Fixes a timeout problem with the aws-s3 library
AWS::S3::Base.class_eval do
class << self
def request_with_rewind(verb, path, options = {}, body = nil, attempts = 0, &block)
body.rewind if body.respond_to?(:rewind)
request_without_rewind verb, path, options, body, attempts, &block
end
alias_method_chain :request, :rewind
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment