Mojolicious Perl
A Perl snippet for Mojolicious that answers requests for /pixel.gif with the empty GIF, decoded once at startup.
Mojolicious Perl
use Mojolicious::Lite -signatures;
use Mojo::Util qw(b64_decode);
my $gif = b64_decode('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
get '/pixel.gif' => sub ($c) {
$c->res->headers->cache_control('no-store');
$c->render(data => $gif, format => 'gif');
};
app->start;
We ran this snippet and compared the bytes it returned.
Check it
curl -sI http://localhost:8080/pixel.gif