Re: Output a page for download

2005-01-12 Thread Jay Scherrer
Wouldn't that be: Content-type "text/plain" ? Jay Scherrer On Wednesday 12 January 2005 06:38 am, Sean Davis wrote: > A basic question, but > > I would like to output tab-delimited text (from a database lookup) > to the user as an application/octet-stream with the name > "tissue_dump.txt". I

Re: Output a page for download

2005-01-12 Thread Sean Davis
good question. If you want to force user to download this file try to set the header 'Content-disposition' to the value 'attachment; filename=tissue_dump.txt' $r->content_type('text/plain') $r->headers_out->set('Content-disposition' => 'attachment; filename=tissue_dump.txt'); worked. Thanks Roman

Re: Output a page for download

2005-01-12 Thread Roman Vašíček
On Wed, Jan 12, 2005 at 09:51:25AM -0500, John Saylor wrote: > hi > > ( 05.01.12 09:38 -0500 ) Sean Davis: > > I would like to output tab-delimited text (from a database lookup) to > > the user as an application/octet-stream with the name > > "tissue_dump.txt". I can't figure out the correct wa

Re: Output a page for download

2005-01-12 Thread Roman Vašíček
Hi, use $r->content_type('application/octet-stream); to set the content type in tissue_dump.txt if file exist and is processed as Mason component (or in dhandler if does not exist). I expect code will looks like $r->content_type('application/octet-stream'); # set content type $m->print($out

Re: Output a page for download

2005-01-12 Thread John Saylor
hi ( 05.01.12 09:38 -0500 ) Sean Davis: > I would like to output tab-delimited text (from a database lookup) to > the user as an application/octet-stream with the name > "tissue_dump.txt". I can't figure out the correct way to set the > headers under mod_perl. Any help? you could buy the boo