Sha256: 03db2cea1f95f3c1b27193c00edcbd1da0da9e7aa68587fecf13ec28b44ba055

Contents?: true

Size: 487 Bytes

Versions: 7

Compression:

Stored size: 487 Bytes

Contents

# frozen_string_literal: true

require "protocol/http1/connection"

module Protocol
  module HTTP1
    class Connection
      def write_request(authority, method, path, version, headers)
        host = authority
        if headers.include?("host")
          host = headers["host"]
          headers.delete "host"
        end

        @stream.write("#{method} #{path} #{version}\r\n")
        @stream.write("host: #{host}\r\n")

        write_headers(headers)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
tansaku-1.4.0 lib/tansaku/monkey_patch.rb
tansaku-1.3.0 lib/tansaku/monkey_patch.rb
tansaku-1.1.0 lib/tansaku/monkey_patch.rb
rangescan-0.3.0 lib/rangescan/monkey_patch.rb
rangescan-0.2.0 lib/rangescan/monkey_patch.rb
tansaku-1.0.0 lib/tansaku/monkey_patch.rb
rangescan-0.1.4 lib/rangescan/monkey_patch.rb