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