lib/httpx/connection/http1.rb in httpx-0.18.0 vs lib/httpx/connection/http1.rb in httpx-0.18.1

- old
+ new

@@ -34,10 +34,12 @@ return if @requests.empty? request = @requests.first + return unless request + return :w if request.interests == :w || !@buffer.empty? :r end @@ -311,11 +313,12 @@ request.transition(:done) end end def join_headers(request) - @buffer << "#{request.verb.to_s.upcase} #{headline_uri(request)} HTTP/#{@version.join(".")}" << CRLF - log(color: :yellow) { "<- HEADLINE: #{@buffer.to_s.chomp.inspect}" } + headline = "#{request.verb.to_s.upcase} #{headline_uri(request)} HTTP/#{@version.join(".")}" + @buffer << headline << CRLF + log(color: :yellow) { "<- HEADLINE: #{headline.chomp.inspect}" } extra_headers = set_protocol_headers(request) join_headers2(request.headers.each(extra_headers)) log { "<- " } @buffer << CRLF end