[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] Determining Content type in postrun (Re-send)


Hi Carlos,

I'm using cgiapp_postrun() to add header and footer to outgoing content. I'm some runmodes, I'm setting the outgoing content type to 'text/plain' which means that I do not want to add header and footer content to the outgoing content.

Here's what I do:

sub cgiapp_postrun
{
     if( $self->header_type eq 'header' )
     {
         my %props = $self->header_props;
         if( !exists($props{'-type'}) or $props{'-type'} eq 'text/html' )
         {
             # do stuff for html output
         }
     }
}


Any help is appreciated. Thanks.

-Carlos


Rhesa


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.