I've got a form that will (should) send various formats back to the client
depending on form values.  They may want the results back in csv, pdf or
plain html.  The form always submits to a .html, and the browser usually
expects an html.

  I've tried setting $r->content_type and even $r->filename to try and get
the browser (ie 5 for now) to see it as a non-html file and "do the
right thing".  Then I came across setting "Content-Disposition":

$r->header_out("Content-Disposition",
"attachment;filename=\"ticket_search.csv\"");

This has an unexpected result, I get a pop-up asking me what I want to do
with the html document (save/exec), if I exec it, it asks me what I want
to do with the csv (save/exec).  I've never run across
Content-Disposition, anyone have a listing of what it does and the
options?

How do other out there return other mime-types when text/html is
requested?

Jay

Reply via email to