# File lib/s3/s3_interface.rb, line 336
    def incrementally_list_bucket(bucket, options={}, headers={}, &block)
      internal_options = Hash[ options.map {|k,v| [k.to_sym, v] } ]
      begin
        internal_bucket = bucket.dup
        unless internal_options.nil? || internal_options.empty?
          internal_bucket << '?' 
          internal_bucket << internal_options.map { |k, v| "#{k.to_s}=#{CGI::escape v.to_s}" }.join('&')
        end
        req_hash            = generate_rest_request('GET', headers.merge(:url=>internal_bucket))
        response            = request_info(req_hash, S3ImprovedListBucketParser.new(:logger => @logger))
        there_are_more_keys = response[:is_truncated]
        if (there_are_more_keys)
          internal_options[:marker] = decide_marker(response)
          total_results             = response[:contents].length + response[:common_prefixes].length
          internal_options['max-keys''max-keys'] ? (internal_options['max-keys''max-keys'] -= total_results) : nil
        end
        yield response
      end while there_are_more_keys && under_max_keys(internal_options)
      true
    rescue
      on_exception
    end