240: def send_request_header
241: query = @options[:query]
242: head = @options[:head] ? munge_header_keys(@options[:head]) : {}
243: cookies = @options[:cookies]
244: body = @options[:body]
245:
246:
247: head['host'] ||= encode_host
248:
249:
250: head['content-length'] ||= body ? body.length : 0
251:
252:
253: head['user-agent'] ||= "Rev #{Rev::VERSION}"
254:
255:
256: head['connection'] ||= 'close'
257:
258:
259: request_header = encode_request(@method, @uri, query)
260: request_header << encode_headers(head)
261: request_header << encode_cookies(cookies) if cookies
262: request_header << CRLF
263:
264: write request_header
265: end