Hello, all

I have a module  that appends a line of stats sensitive information to
the bottom of html pages or
cgi scripts. the module uses lookup_uri() to generate a subrequest then
calls  run() to output the actual contents of the file. the eagle book
says that calling run() on a subrequest should automatically send the
client the appropriate http headers and the document's body. However, I
have found that this is not the case. The following code does not send
http headers for both cgis and html docs. The body stuff is working fine
but the headers are not being sent:

        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->run();
        my $status = $subr->status;
        $r->print(&create_img_tag($file,$SCRIPT_ON,$status));
        return $status;

any ideas?

BTW> &create_img_tag just returns a string.
-amen

Reply via email to