>
> I am returning HTML. Lots of it. My example was simply to
> illustrate my attempt
> to return a 404. What follows may be a better way of communicating my
> intentions.
>
> [-
>     # Do a lot of DBI stuff.
>
>     .
>     .

#Why not change to

-]


     .

        [$ if ($records_not_found_so_I_cannot_generate_the_page) $]

        <html> <title> Not found </title>

        ....

        The requested page could not be found


        </html>
        [-

         $req_rec->status('404');
         exit;
        -]
        [$endif$]

>
> -]
> <html>
> <!-- Lot's of HTML -->
>
>     .
>     .
>     .
>
> </html>
>
> But, I understand what you mean by having to return a 404.
>
> I've managed to do redirects from Embperl by setting the status
> and adding
> a Location header. I was hoping that I could do the same for a 404.
>
> I suppose I am going to be told that I have to chain handlers and
> the like,
> so I'll start reading the guide.
>

The difference to the redirect is, that in the not found case you want
Apache to generate the error page for you (instead of creating your own one
as in the example above), while the redirect doesn't need any further
processing by Apache.

> Wouldn't it be easier if there as a way to set the return value
> from within
> Embperl?
>

Yes, I add it to the todo list

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925151
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------

Reply via email to