[Dancer-users] status code needs to be an integer greater than or equal to 100

P Kishor punk.kish at gmail.com
Fri Oct 1 18:18:16 CEST 2010


On Thu, Sep 30, 2010 at 9:01 PM, P Kishor <punk.kish at gmail.com> wrote:
> I am getting the following error
>
> "status code needs to be an integer greater than or equal to 100 at
> /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/StackTrace.pm
> line 27"
>
> I am assuming it is coming from
>
> 103:     unless ($res->[0] =~ /^\d+$/ && $res->[0] >= 100) {
>
> in Carp::croak at
> /usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/Lint.pm line
> 103
>
> Why am I encountering this? Is this a timeout?
>


So, this is what I am trying to do...

get '/image/:foo' => sub {
    unless (-e "$dir/$img") {
        create_image( params->{foo} );
    }

    send_file("$dir/$img");
}

in other words, if the requested image exists, send it back, else,
create it and then send it back.

If the image exists, I get the image in the browser. If the image
doesn't exist, it gets created, but the application croaks with

"status code needs to be an integer greater than or equal to 100 at
/usr/local/lib/perl5/site_perl/5.12.1/Plack/Middleware/StackTrace.pm
line 27"

On subsequent browser refresh, the image is sent back fine because it
already exists.

What is going on?


-- 
Puneet Kishor


More information about the Dancer-users mailing list