I am started to look at the PSGI, I know the response from the application should be an array ref of three elements, [code, headers, body]:
#!/usr/bin/perl
my $app = sub {
my $env = shift;
return [
200,
[ 'Content-type', 'text/plain' ],
[ 'Hello world' ],
]
};
The question is how to send a file for example zip or pdf for download to the browser.