Sha256: e2c5f9da4ada412dd25da2145ee11a98d128af54f30e3d731d38f0ffaf70c508

Contents?: true

Size: 609 Bytes

Versions: 50

Compression:

Stored size: 609 Bytes

Contents

module Seahorse
  module Client
    module Plugins
      class ContentLength < Plugin

        # @api private
        class Handler < Client::Handler

          def call(context)
            begin
              length = context.http_request.body.size
              context.http_request.headers['Content-Length'] = length
            rescue
              # allowing `Content-Length` failed to be set
              # see Aws::Plugins::TransferEncoding
            end
            @handler.call(context)
          end

        end

        handler(Handler, step: :sign, priority: 0)

      end
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
aws-sdk-core-3.89.1 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.89.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.88.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.87.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.86.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.85.1 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.85.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.84.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.83.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.82.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.81.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.80.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.79.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.78.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.77.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.76.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.75.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.74.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.73.0 lib/seahorse/client/plugins/content_length.rb
aws-sdk-core-3.72.1 lib/seahorse/client/plugins/content_length.rb