Look please this :

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>
--------------------------------------------------------------

- that print Hi when I load "page"
- print Hi when I do : perl get_link.pl get /ex1.zip
- do NOT print Hi when I click my link "Exemple 1"
- but print Hi if I write <a href="/ex1.txt"> :  txt file and not more 
zip... That displays the content of the text file in the browser and print 
Hi.

Impossible to do that with a zip file...  Do please someone have an idea ?

NB : ex1.zip and ex1.txt files are in .../public/






-- 
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