I am attempting to stream the output of a curl command with Mojolicious.
The curl command looks (roughly) like this:
curl -H "x-amz-server-side-encryption-customer-algorithm:AES256" -H
"x-amz-server-side-encryption-cust\
omer-key:secretKey=" -H "x-amz-server-side-encryption-customer-key-M\
D5
So there is a lot here and there's definitely easier ways to do it but just
to start, Mojo::UserAgent can handle the streaming response in a more async
manner so you may want to start by replacing the shell out to curl with
that. Then see
https://metacpan.org/pod/Mojolicious::Guides::Cookbook#Strea
And if you want to stream directly to the browser that made the original
request, there are also proxy helpers that do all the streaming stuff for
you.
https://mojolicious.org/perldoc/Mojolicious/Plugin/DefaultHelpers#proxy-get_p
--
sebastian
--
You received this message because you are
I had previously attempted to use Mojo::UserAgent, but failed to get it to
work. I resuscitated my prior efforts, and demonstrated that I still can't
seem to get the amazon http headers correct.
Here is a curl command that works:
curl -H "x-amz-server-side-encryption-customer-algorithm:AES256"