Skip to content

Commit

Permalink
use more secure download addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 15, 2014
1 parent 3240959 commit 8219cce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/Mojo/UserAgent.pm
Expand Up @@ -393,7 +393,8 @@ Mojo::UserAgent - Non-blocking I/O HTTP and WebSocket user agent
= $ua->put('[::1]:3000' => {'Content-Type' => 'text/plain'} => 'Hello!');
# Follow redirects to grab the latest Mojolicious release :)
$ua->max_redirects(5)->get('latest.mojolicio.us')
$ua->max_redirects(5)
->get('https://www.github.com/kraih/mojo/tarball/master')
->res->content->asset->move_to('/Users/sri/mojo.tar.gz');
# TLS certificate authentication and JSON POST
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -981,7 +981,7 @@ file with L<Mojo::Asset::File/"move_to">.

# Lets fetch the latest Mojolicious tarball
my $ua = Mojo::UserAgent->new(max_redirects => 5);
my $tx = $ua->get('latest.mojolicio.us');
my $tx = $ua->get('https://www.github.com/kraih/mojo/tarball/master');
$tx->res->content->asset->move_to('mojo.tar.gz');

To protect you from excessively large files there is also a limit of 10MB by
Expand Down

0 comments on commit 8219cce

Please sign in to comment.