Skip to content

Commit b606e86

Browse files
committed
Allow authority to be optional.
1 parent 71606bd commit b606e86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/protocol/http1/connection.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,11 @@ def open!
224224
return self
225225
end
226226

227-
def write_request(authority, method, path, version, headers)
227+
def write_request(authority, method, target, version, headers)
228228
open!
229229

230-
@stream.write("#{method} #{path} #{version}\r\n")
231-
@stream.write("host: #{authority}\r\n")
230+
@stream.write("#{method} #{target} #{version}\r\n")
231+
@stream.write("host: #{authority}\r\n") if authority
232232

233233
write_headers(headers)
234234
end

0 commit comments

Comments
 (0)