def completed?(str)
    str, @prelude = @prelude + str, "" unless @prelude.empty?
    add_lines(str)
    return unless @state == :body && @body.bytesize >= @content_length
    @prelude = bslice(@body, @content_length..-1)
    @body = bslice(@body, 0..@content_length)
    @state = :init
  end
def completed?(str)
    str, @prelude = @prelude + str, "" unless @prelude.empty?
    add_lines(str)
    return unless @state == :body && @body.bytesize >= @content_length
    @prelude = bslice(@body, @content_length..-1)
    @body = bslice(@body, 0..@content_length)
    @state = :init
  end
def completed? ( str ) str , @prelude = @prelude + str , "" unless @prelude . empty? add_lines ( str ) return unless @state == :body && @body . bytesize >= @content_length @prelude = bslice ( @body , @content_length .. - 1 ) @body = bslice ( @body , 0 .. @content_length ) @state = :init end
adds data to the request, returns true if request is complete
adds data to the request returns true if request is complete