On Tue, Feb 8, 2011 at 12:45 AM, Matthew Vickers <mvickers@quispiam.com> wrote:

Are we talking about merging the elements into the one function-call?
 send_file(
   $contents,
   type=>'text/foo',
   as_attachment=>'myfile.foo' )

>> My thoughts are more of fixing send_file itself, so Matthew (and anyone else) could just do send_file($filename).

I like this idea, mostly because it makes it easier to remember and is more logical.  Send Headers, Send File.

But Richard's idea with some parameters being optional for backward compatability is also good.

I'm not sure about the implementation of send_file() - I haven't checked it myself - but shouldn't it set the correct headers? What is the nature of the headers you're explicitly declaring?

I should probably do some more reading instead of asking you, but it's 2am and I'm tired. :)