Raphael Deem
9aec5febb8
support vhosts in static routes
2017-09-27 01:24:49 -07:00
lixxu
bc20dc5c62
use url_for for url building for static files
2017-09-06 19:17:52 +08:00
Ashley Sommer
ef80953b1b
Fix flake8 line length error.
2017-05-20 09:56:05 +10:00
ashleysommer
72db1188c7
Add an option to the static() helper to switch on streaming for large files.
...
By default uses a 1M threshold.
ie. if the static file to serve is >= 1M it will stream the file.
This threshold value is configurable by passing an int instead of a bool to `stream_large_files` parameter of `static()`.
2017-05-20 09:56:05 +10:00
Raphael Deem
3e87314adf
use absolute path in static root
2017-04-16 21:58:10 -07:00
lazydog
ae09dec05e
fixed UnboundLocalError
2017-04-14 03:38:55 +08:00
lazydog
afd51e0823
fix directory traversal flaw
2017-04-14 02:55:39 +08:00
Eli Uriegas
54b2d74068
Get rid of relative imports
2017-02-15 20:54:00 -06:00
Angus Hollands
51611c3934
Pep8 cleanups ( #429 )
...
* PEP8 cleanups
* PEP8 cleanups (server.py)
* PEP8 cleanups (blueprints.py)
* PEP8 cleanups (config.py)
* PEP8 cleanups (cookies.py)
* PEP8 cleanups (handlers.py)
* PEP8 cleanups (request.py)
* PEP8 cleanups (response.py)
* PEP8 cleanups (router.py)
* PEP8 cleanups (sanic.py) #2
* PEP8 cleanups (server.py) #2
* PEP8 cleanups (static.py)
* PEP8 cleanups (utils.py)
* PEP8 cleanups (views.py)
Updated docstring
2017-02-14 13:10:19 -06:00
Kyle Blöm
d193a1eb70
Added the tests, code formatting changes, and the Range Request feature.
2017-01-30 17:04:51 -08:00
Cadel Watson
52c59e7133
Fix all docstring errors.
...
When generating documentation with sphinx-apidoc, there are currently
many docstring errors, mostly minor. This commit fixes all errors.
2016-12-25 20:43:45 +11:00
Eli Uriegas
16182472fa
Remove trailing whitespace
2016-12-24 18:11:46 -08:00
Eli Uriegas
29f3c22fed
Rework conditionals to not be inline
2016-12-24 18:11:12 -08:00
Paul Jongsma
2003eceba1
remove trailing space
2016-12-13 10:41:39 +01:00
Paul Jongsma
9ba2f99ea2
added a comment on why to decode the file_path
2016-12-13 01:10:24 +01:00
Paul Jongsma
0464d31a9c
Find URL encoded filenames on the fs by decoding them first
2016-12-10 12:16:37 +01:00
Channel Cat
74ae0007d3
Reverse static arguments
2016-10-25 02:45:28 -07:00
Channel Cat
bf6879e46f
Made static file serving part of Sanic
...
Added sanic.static, blueprint.static, documentation, and testing
2016-10-24 01:21:06 -07:00
imbolc
d7fff12b71
Static middleware
2016-10-24 02:17:03 +07:00