B
born in USSR
How can web-server written on Ruby, send *.ico, *.jpg, *.bmp etc files
to browser.
I try:
to browser.
I try:
...
server=TCPServer.new(80)
session=server.accept
request=session.gets
but it doesn't work.str=nil
File.open(page,"rb") do |sd|
if str==nil then str=sd.sysread(1) else str+=sd.sysread(1) end
end
session.puts str
...