I got nothing...  Same code, executed the same way...  What version of
Mojolicious are you using?

Instead of using `print`, try `warn` or even better use
$c->app->log->info(...)

$ perl get_link.pl daemon -m development -l http://*:3002
[Sat Feb 24 10:43:07 2018] [info] Listening at "http://*:3002";
Server available at http://127.0.0.1:3002
Hi                                                                       #
<---  I load "/"
[Sat Feb 24 10:43:15 2018] [debug] GET "/"
[Sat Feb 24 10:43:15 2018] [debug] Template "not_found.development.html.ep"
not found
[Sat Feb 24 10:43:15 2018] [debug] Template "not_found.html.ep" not found
[Sat Feb 24 10:43:15 2018] [debug] Rendering template "mojo/debug.html.ep"
[Sat Feb 24 10:43:15 2018] [debug] Rendering template "mojo/menubar.html.ep"
[Sat Feb 24 10:43:15 2018] [debug] Your secret passphrase needs to be
changed
[Sat Feb 24 10:43:15 2018] [debug] 404 Not Found (0.024707s, 40.474/s)
Hi                                                                       #
<---  I load "page"
[Sat Feb 24 10:43:23 2018] [debug] GET "/page"
[Sat Feb 24 10:43:23 2018] [debug] Routing to a callback
[Sat Feb 24 10:43:23 2018] [debug] Rendering template "page.html.ep" from
DATA section
[Sat Feb 24 10:43:23 2018] [debug] 200 OK (0.000766s, 1305.483/s)
Hi                                                                       #
<---  I click the link for http://localhost:3002/ex1.zip

$ mojo version
CORE
  Perl        (v5.22.1, linux)
  Mojolicious (7.61, Doughnut)

OPTIONAL
  EV 4.0+                 (n/a)
  IO::Socket::Socks 0.64+ (n/a)
  IO::Socket::SSL 1.94+   (2.024)
  Net::DNS::Native 0.15+  (n/a)
  Role::Tiny 2.000001+    (2.000001)

You might want to update your Mojolicious to 7.68!

$ cat get_link.pl
#!/usr/bin/env perl
use Mojolicious::Lite;

app->hook(before_dispatch => sub {
  my $c = shift;
  print "Hi\n";
});
get '/page'  => sub { my $c = shift ; $c->render };

app->start;

__DATA__
@@ page.html.ep
<a href="/ex1.zip">Exemple 1</a>


On Wed, Feb 21, 2018 at 9:24 AM, <[email protected]> wrote:

> When I click my link to the zip, that download the zip file.
>
> Nothing in the console...
>
> mojolicious@poste1:~/rd/test_perl$ perl get_link.pl daemon -m development
> [Wed Feb 21 16:20:36 2018] [info] Listening at "http://*:3000";
> Server available at http://127.0.0.1:3000
> Hi
> # <---  I load "page"
> [Wed Feb 21 16:20:43 2018] [debug] GET "/page"
> [Wed Feb 21 16:20:43 2018] [debug] Routing to a callback
> [Wed Feb 21 16:20:43 2018] [debug] Rendering template "page.html.ep" from
> DATA section
> [Wed Feb 21 16:20:43 2018] [debug] 200 OK (0.002046s, 488.759/s)
> Hi
> # <---  I load "page"
> [Wed Feb 21 16:20:45 2018] [debug] GET "/page"
> [Wed Feb 21 16:20:45 2018] [debug] Routing to a callback
> [Wed Feb 21 16:20:45 2018] [debug] Rendering cached template
> "page.html.ep" from DATA section
> [Wed Feb 21 16:20:45 2018] [debug] 200 OK (0.000676s, 1479.290/s)
>                                                                        #
> <---  I click the link... (nothing here)
>
>
> :(
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/mojolicious.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to