hmmmm,

I have tried what you suggested and it is still not generating the
headers. I have tried calling the send_http_header function both before
and after the handler switch and it still is not working. I think it is
bug but I am not sure. At any rate, here is some of the module code and
the http.conf directives:

        my $uri = $r->uri;
        unless(!$r->args) {
            $uri = $uri .'?'.$r->args;
        }
        my $subr = $r->lookup_uri($uri);
        if($r->dir_config('is_cgi')) {
            $subr->handler('cgi-script');
        } else {
            $subr->handler('server-parsed');
        }
        $subr->send_http_header;
        $subr->run();
        my $status = $subr->status;
        $subr->print(&create_img_tag($file,$SCRIPT_ON,$status));
        return $status;

 
<Files ~ "\.(html|htm|shtml|fhtml)$">
    SetHandler perl-script
    PerlHandler Macromedia::AddStatImage
</Files>
<Files ~ "\.(cgi|pl|sh)$">
    SetHandler perl-script
    PerlHandler Macromedia::AddStatImage
    PerlSetVar is_cgi 1
</Files>

any ideas?
-amen

On Mon, 21 Aug 2000, Doug MacEachern wrote:

> On Sun, 20 Aug 2000, Alex Menendez wrote:
> 
> > unfortunately, I am not entirely sure what a cgi is going  to output all the
> > time. The cgi might try to do a redirect using the Location field. Therefore,
> > I don't think I can simply send_http_headers as type text/html...
> 
> right, 
> 
> > >   my $lookup = $r->lookup_uri( $uri );
> > >   $r->send_http_header( 'text/html' );
> 
> so just change that line to:
> $lookup->send_http_header;
> 
> and you'll get the content-type and headers generated by the subrequest.
> if there's a bug, it's in the book, subrequest->run() is not supposed to
> include headers in the output.
> 

Reply via email to