lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Mar 1, 2010 at 11:03 AM, RJP Computing <rjpcomputing@gmail.com> wrote:
Hi Fabio,


On Thu, Oct 8, 2009 at 10:20 AM, RJP Computing <rjpcomputing@gmail.com> wrote:
 serve_static also supports X-SendFile, if you set use_xsendfile to true in your application object.

What are the reasons to use X-SendFile versus the default? I try that and I get a page that has the html source:

    <html><head><title>Not Found</title></head>
    <body><p>Not found!</p></body></html>

and no download it started. When I set 'use_xsendfile = false' I get the text.txt file rendered in the browser. Is this what is suppose to happen?


X-Sendfile is a header that some servers support that tells the server to send the file for you. You have to check if your web server supports X-Sendfile and how to enable it.
 
Is there a way to force a download dialog to open instead of rendering the text in the browser?

That is up to the browser and what it decides to do with the file's content-type...
 
--
Regards,
Ryan

--
Fabio Mascarenhas