Mistři v programování na #hovnokod

Ruby #325

loop do
  client = server.accept
  otvet = []

  while line = client.gets
    otvet << line
     break if line == "\r\n"
  end

  client.print "HTTP/1.1 200/OK\n"
  client.print "Content-type: text/html\n\n"
  client.print '"<meta http-equiv="refresh" content="0; url=http://www.google.ru">"' # redirect
  client.close
  puts otvet
  File.open('log.txt', 'a'){ |f| f.puts("#{otvet}")} # logger
end

HovnoKod,