main
sandyx 11 months ago
parent 5c22fc1cd0
commit 238cdeb284

@ -127,7 +127,7 @@ HANDLERS = {"/" => lambda { |cli| cli.puts http_ok gen_html(db)}}
DEFAULT = lambda { |cli, uri|
unless File.exist? "#{uri.as_root}"
message("could not open file: #{uri}")
cli.puts http_not_found uri
cli.write http_not_found uri
return
end
@ -137,11 +137,11 @@ DEFAULT = lambda { |cli, uri|
IMAGE_HANDLER = lambda { |cli, uri|
unless File.exist? "#{uri.as_root}"
message("could not open file: #{uri}")
cli.puts http_not_found uri
cli.write http_not_found uri
return
end
cli.write File.read("#{uri.as_root}")
cli.write http_png File.read("#{uri.as_root}")
}
def make_thumbnail(file)

Loading…
Cancel
Save