Solved.
I was able to get the desired behavior by wrapping things in app.pl
#!/usr/bin/env perl use Dancer; use REST_App; #dance; use Plack::Builder; my $app = sub { my $env = shift; if (length ($env->{REQUEST_URI}) > 1000) { return [ '414', [ 'Content-Type' => 'text/html' ], [ get_414_page() ], # HTML for the error page ]; } my $request = Dancer::Request->new(env => $env); Dancer->dance($request); }; builder { $app; };
In reply to Re: Limit URL length with Dancer/Starman
by gsiems
in thread SOLVED: Limit URL length with Dancer/Starman
by gsiems
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |