Flowdock
method

send_request_with_body_stream

Importance_0
send_request_with_body_stream(sock, ver, path, f) private

No documentation

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

Hide source
# File lib/net/http.rb, line 1940
    def send_request_with_body_stream(sock, ver, path, f)
      unless content_length() or chunked?
        raise ArgumentError,
            "Content-Length not given and Transfer-Encoding is not `chunked'"
      end
      supply_default_content_type
      write_header sock, ver, path
      wait_for_continue sock, ver if sock.continue_timeout
      if chunked?
        while s = f.read(1024)
          sock.write(sprintf("%x\r\n", s.length) << s << "\r\n")
        end
        sock.write "0\r\n\r\n"
      else
        while s = f.read(1024)
          sock.write s
        end
      end
    end
Register or log in to add new notes.