Skip to content
This repository
branch: middleware-api2
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 7 lines (6 sloc) 0.276 kb
1 2 3 4 5 6
use File::Basename;
my $path = $ENV{PSGI_IMAGE_FILE} || dirname(__FILE__) . "/../../share/kyoto.jpg";
my $handler = sub {
    open my $fh, "<", $path or die $!;
    return [ 200, [ "Content-Type" => "image/jpeg", "X-Sendfile" => $path, "Content-Length" => -s $fh ], $fh ];
};
Something went wrong with that request. Please try again.