[web2py] Let the web server stream your files, not response.download!

127 views
Skip to first unread message

Thadeus Burgess

unread,
Apr 18, 2010, 12:34:33 PM4/18/10
to web2py-users

mdipierro

unread,
Apr 18, 2010, 3:00:57 PM4/18/10
to web2py-users
Is this cherokee specific? Would it work on apache?

Just a comment. This will bypass db.table.field.authorize so auth
permissions on downloads will not be enforced.

Massimo

Thadeus Burgess

unread,
Apr 18, 2010, 4:01:25 PM4/18/10
to web...@googlegroups.com
It works with apache, as long as you install the module.

Cherokee just has it enabled by default, and is the webserver I use currently.

The advantages of X-Sendfile is that you still get to have permissions
on downloads, its simply, if they are not authorized, do not set a
x-sendfile header. You can do any checks you wish on the web2py end.

--
Thadeus

mdipierro

unread,
Apr 18, 2010, 7:43:15 PM4/18/10
to web2py-users
I see. Than the current download function could be improved to take
advantage of this.

On Apr 18, 3:01 pm, Thadeus Burgess <thade...@thadeusb.com> wrote:
> It works with apache, as long as you install the module.
>
> Cherokee just has it enabled by default, and is the webserver I use currently.
>
> The advantages of X-Sendfile is that you still get to have permissions
> on downloads, its simply, if they are not authorized, do not set a
> x-sendfile header. You can do any checks you wish on the web2py end.
>
> --
> Thadeus
>

Thadeus Burgess

unread,
Apr 18, 2010, 7:48:37 PM4/18/10
to web...@googlegroups.com
Precisely!
Reply all
Reply to author
Forward
0 new messages