Kitware / tangelo

A simple, quick, powerful web framework
http:/tangelohub.org/tangelo/
Apache License 2.0
185 stars 35 forks source link

Service redirects #539

Closed waxlamp closed 8 years ago

waxlamp commented 8 years ago

Closes #531

manthey commented 8 years ago

A variation on this, rather than redirecting, is to serve a file internally. This is done in cherrypy via return cherrypy.lib.static.serve_file(<path>, content_type=<mime type>)) rather than returning with the data. This allows serving files that aren't in the root tree, and therefore adds some functionality that doesn't exist in internal_redirect. This feature could be added to this PR, or I could create a new issue for it.

waxlamp commented 8 years ago

The "file service" functionality is in a different PR that I'm working on now. Expect to see that sometime today. It has precisely the advantage you mentioned, that it allows for service of arbitrary file content that isn't otherwise available from Tangelo.

manthey commented 8 years ago

LGTM