laziness, impatience, and hubris | |
PerlMonks |
Re: serving a zip file with Dancer2by 1nickt (Canon) |
on May 14, 2018 at 14:27 UTC ( [id://1214456]=note: print w/replies, xml ) | Need Help?? |
Hi, just a guess: do you have the charset set in your config? If so, the output may be getting double-encoded since you add a charset manually in your Content-Type header? As for idiomatic, I don't work with compressed files myself but I can say that middlewares are ususally the right approach to this type of intermediate content handling, see eg Plack::Middleware::Deflater (which compresses outgoing content). Hope this helps!
The way forward always starts with a minimal test.
In Section
Seekers of Perl Wisdom
|
|