Merge branch 'master' into cli-upgrade
This commit is contained in:
commit
6a5c8becac
|
@ -88,5 +88,5 @@ When `stream_large_files` is `True`, Sanic will use `file_stream()` instead of `
|
||||||
|
|
||||||
app = Sanic(__name__)
|
app = Sanic(__name__)
|
||||||
|
|
||||||
chunk_size = 1024 * 1024 * 8 # Set chunk size to 8KB
|
chunk_size = 1024 * 1024 * 8 # Set chunk size to 8MiB
|
||||||
app.static('/large_video.mp4', '/home/ubuntu/large_video.mp4', stream_large_files=chunk_size)
|
app.static('/large_video.mp4', '/home/ubuntu/large_video.mp4', stream_large_files=chunk_size)
|
||||||
|
|
|
@ -179,8 +179,8 @@ def abort(status_code, message=None):
|
||||||
message appropriate for the given status code, unless provided.
|
message appropriate for the given status code, unless provided.
|
||||||
|
|
||||||
:param status_code: The HTTP status code to return.
|
:param status_code: The HTTP status code to return.
|
||||||
:param message: The HTTP response body. Defaults to the messages
|
:param message: The HTTP response body. Defaults to the messages in
|
||||||
in response.py for the given status code.
|
STATUS_CODES from sanic.helpers for the given status code.
|
||||||
"""
|
"""
|
||||||
if message is None:
|
if message is None:
|
||||||
message = STATUS_CODES.get(status_code)
|
message = STATUS_CODES.get(status_code)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user