On Wed, 14 Jun 2000, Paul J. Lucas wrote:
> The second example on p. 128 of the Eagle book sets the content
> type and send the HTTP headers itself before running a
> subrequest.
>
> However, on p. 468, the documentation for the run() method says
> in part:
>
> When you invoke the subrequest's response handler in
> this way, it will do everything a response handler is
> supposed to, includinf sendinf the HTTP headers and the
> document body. ... If you arevoking the subrequest
> urn() method from within your own content handler, you
> must not sen the HTTP headers and document body
> yourself ...
>
> These seem to contradict each other. From testing, however, it
> seems as though the example on p. 128 is correct and the
> documentation on p. 468 isn't. Is this true?
right, subrequest->run does not output headers.
> my $sub_r = $r->lookup_file( $full_path );
> my $status = $sub_r->status();
> unless ( $status == DOCUMENT_FOLLOWS ) {
> $r->log_error( "Can't look up $full_path" );
> return $status;
> }
> $r->send_http_header( $sub_r->content_type() );
does it help if you change that to:
$sub_r->send_http_header;
?