Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Limit URL length with Dancer/Starman

by gsiems (Deacon)
on Nov 14, 2013 at 21:39 UTC ( [id://1062662]=note: print w/replies, xml ) Need Help??


in reply to SOLVED: Limit URL length with Dancer/Starman

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1062662]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-20 01:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found