On Fri, 16 Jun 2000, Vivek Khera wrote:
> The other alternative is to generate your entire page as a string, get
> the string's length() and print that as your content-length header.

This is what I do, for two reasons.  First, most browsers give more
information to the user if you supply this, in the form of a progress bar
during downloads.  Second, if anything goes wrong during processing the
request I want to send out a user-friendly error page.  This is only
possible if you haven't sent any output yet.

Incidentally, the $r->print() method conveniently lets you pass the string
you want to send by reference.

- Perrin

Reply via email to