On 11/11/99 7:49 PM, John Siracusa wrote:
> $uri .= 'index.html';
> # /<dir>/ is now /<dir>/index.html
> my($sr) = $r->lookup_uri($uri);
> return $sr->run();
>
> it appears to work, but the headers I get are simply:
>
> HTTP/1.0 200 OK
> Date: Fri, 12 Nov 1999 00:25:44 GMT
>
> No content type! I've tried explicitly setting $sr's content_type()
> before I run() it and that doesn't work either.
In the grand tradition of asking for help, I solved this bit seconds
after I sent the email :)
my($sr) = $r->lookup_uri($uri);
$r->send_http_header('text/html');
return $sr->run();
The bit I was missing was that I have to call send_http_header() on the
*original* request object $r, not the subrequest $sr.
I'm still not sure how to correctly search for "index-ish" files
(as per the server configuration) rather than explicitly tacking on
the constant string "index.html", however. How does apache do this
internally?
-John