> > In the past, the way I returned 404 page through CGI::App was something > > like this: > > > > return $self->error(title => 'Page not found'); > > > > I learned that is too late to return a real 404 error running under CGI, > > so the page comes back with a 200 status code, which isn't quite right. > > > > More recently, I learned that with mod_perl, I learned that I can get > > the system to return a true 404, so I updated the logic to do that when > > possible: > > > > if (exists $ENV{MOD_PERL}) { > > $self->header_add( -status => 404 ); > > return ''; > > } > > else { > > return $self->error(title => 'Page not found') > > } > > > I recently ran into this myself, and discovered that setting the header_type > to 'redirect' fixed the issue: > > if (exists $ENV{MOD_PERL}) { > $self->header_add( -status => 404 ); > return $self->redirect('/'); > }
Good to know! Had you run into the "500/eof/chunk" error as well, before you added the redirect? The approach I settled on was to patch LWP to quit throwing that error, as "real" browsers seem to deal with it OK. The other behavior I reported about "can't find modules" I think was a separate configuration issue in my case. Thanks for the redirect tip, Rhesa! Mark -- . . . . . . . . . . . . . . . . . . . . . . . . . . . Mark Stosberg Principal Developer [EMAIL PROTECTED] Summersault, LLC 765-939-9301 ext 202 database driven websites . . . . . http://www.summersault.com/ . . . . . . . . ##### CGI::Application community mailing list ################ ## ## ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ## ## ## ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ## ## ################################################################