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
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 confirm is working perfectly here too, windows 10 and Mojolicious (7.61,
Doughnut). When link point to zip file download it, when point to txt file
xhow it's content
Paolo
2018-02-21 2:30 GMT+01:00 Stefan Adams :
> $ mkdir public
> $ date > public/ex1.txt
> $ zip public/ex1.zip public/ex1.txt
>
$ mkdir public
$ date > public/ex1.txt
$ zip public/ex1.zip public/ex1.txt
$ ls -l get_link.pl public/
-rw-rw-r-- 1 stefan stefan 240 Feb 20 19:20 get_link.pl
-rw-rw-r-- 1 stefan stefan 29 Feb 20 19:21 public/ex1.txt
-rw-rw-r-- 1 stefan stefan 207 Feb 20 19:21 public/ex1.zip
$ perl get_link.pl ge
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.htm
On Mon, Feb 19, 2018 at 1:31 PM, Илья Рассадин wrote:
> Do you have any server dispatching requests before Mojolicious?
>
> Nginx or Apache maybe?
>
Agreed. Check out this example:
$ cat /tmp/hook
use Mojolicious::Lite;
# Use /etc as the public folder root (because everyone has an /etc)
unshi
Do you have any server dispatching requests before Mojolicious?
Nginx or Apache maybe?
On 2/19/18 7:51 PM, amka1...@gmail.com wrote:
app->hook(before_dispatch => sub {
my $c = shift;
print "Hi\n";
});
don't react for the links (to .../public folder).
Have you please another idea ?
--
You
app->hook(before_dispatch => sub {
my $c = shift;
print "Hi\n";
});
don't react for the links (to .../public folder).
Have you please another idea ?
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop rec
On Mon, Feb 19, 2018 at 4:15 AM, wrote:
> Hi,
>
> I tried things like
>
> app->hook(before_routes => sub {
> my $c = shift;
> print "Hi\n"
> });
>
> Changing "before_routes" with other things but impossible : I catch all
> the links except my download link :(
>
I think you want before_dispa
Hi,
I tried things like
app->hook(before_routes => sub {
my $c = shift;
print "Hi\n"
});
Changing "before_routes" with other things but impossible : I catch all the
links except my download link :(
--
You received this message because you are subscribed to the Google Groups
"Mojoliciou
10 matches
Mail list logo