Flowdock
send_body_string(socket) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/webrick/httpresponse.rb, line 282
    def send_body_string(socket)
      if @request_method == "HEAD"
        # do nothing
      elsif chunked?
        remain = body ? @body.size : 0
        while buf = @body[@sent_size, BUFSIZE]
          break if buf.empty?
          data = ""
          data << format("%x", buf.size) << CRLF
          data << buf << CRLF
          _write_data(socket, data)
          @sent_size += buf.size
        end
        _write_data(socket, "0#{CRLF}#{CRLF}")
      else
        if @body && @body.size > 0
          _write_data(socket, @body)
          @sent_size = @body.size
        end
      end
    end
Register or log in to add new notes.