Daniel Schwarz
0e5c7a62cb
remove debug messages
2017-05-27 22:36:08 +02:00
Daniel Schwarz
1b33e05f74
fix debug log messages
2017-05-27 16:32:39 +02:00
Daniel Schwarz
53a04309ff
add header_fragment handeling
2017-05-27 16:28:57 +02:00
Daniel Schwarz
dc411651b6
add check for header and value
2017-05-27 15:36:57 +02:00
Daniel Schwarz
514540b90b
add debug for header values
2017-05-27 15:32:37 +02:00
messense
0024edbbb9
Add websocket max_size and max_queue configuration
2017-05-26 11:15:28 +08:00
Eli Uriegas
48de321869
Merge pull request #697 from 38elements/stream
...
Add Request.stream
2017-05-24 16:22:52 -07:00
Raphael Deem
c6d68009d2
Merge pull request #745 from messense/feature/gunicorn-worker-test-case
...
Add a simple integration test for Gunicorn worker
2017-05-23 20:53:01 -07:00
Raphael Deem
2cab267405
Merge pull request #734 from ashleysommer/static_large_file_stream
...
Add option to static helper to use streaming for large files.
2017-05-23 20:52:12 -07:00
messense
6bdc0d2e5e
Fix Gunicorn worker
2017-05-23 11:28:12 +08:00
Raphael Deem
b447807b36
Merge pull request #742 from r0fls/700
...
changes required for unix socket support
2017-05-22 19:29:32 -07:00
Raphael Deem
52b0254ec6
unix socket support; fixes #700
2017-05-21 03:15:06 -07:00
Raphael Deem
49631542ce
Merge pull request #732 from jrocketfingers/feature/explicit-register-middleware
...
Extract register_middleware into a method.
2017-05-21 03:06:12 -07:00
Raphael Deem
4b80ffb9eb
Merge pull request #740 from r0fls/739
...
add abort function
2017-05-21 02:20:02 -07:00
Raphael Deem
9efa7c116d
remove redundant code; decode response
2017-05-20 23:27:00 -07:00
Raphael Deem
1a60201f68
flake8 spacing
2017-05-20 10:44:09 -07:00
Raphael Deem
f3186abf09
SANIC_EXCEPTIONS -> _sanic_exceptions
2017-05-20 10:29:00 -07:00
Raphael Deem
588b4712bf
add exception decorator
2017-05-20 01:24:34 -07:00
Raphael Deem
d3b6208057
add abort function
2017-05-19 18:52:19 -07: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
58a9c92d75
fix 739
2017-05-19 13:35:04 -07:00
Ashley Sommer
ff2ae11ac8
Remove exception print(e) statement.
2017-05-19 13:00:01 +10:00
Johnny Rocketfingers
3f841f3b21
Switch to non-hardcoded register_middleware.
2017-05-18 22:08:44 +02:00
ashleysommer
e155fe403d
Add file_stream response handler
...
For streaming large static files
Like `file()` but breaks the file into chunks and sends it with a `StreamingHTTPResponse`
Chunk size is configurable, but defaults to 4k, this seemed to be the sweet spot in my testing.
Also supports ContentRange same as `file()` does.
2017-05-18 18:04:28 +10:00
Johnny Rocketfingers
bf5438d573
Extract register_middleware into a method.
2017-05-18 06:36:11 +02:00
Raphael Deem
0e4aaf8856
Merge pull request #731 from jrocketfingers/fix/token-missing-auth-headers
...
Check that the Authorization headers are actually provided.
2017-05-17 13:10:12 -07:00
Raphael Deem
5c44ce1637
Merge pull request #719 from messense/feature/worker-uvloop
...
Gunicorn worker should not require uvloop
2017-05-17 12:47:19 -07:00
Raphael Deem
974fe25a11
Merge pull request #722 from messense/feature/ci-without-ext
...
Add py3*-no-ext test env
2017-05-17 12:47:05 -07:00
Johnny
5d309af86f
Check that the headers are actually provided.
2017-05-17 11:08:50 +02:00
messense
2f84cdd708
Fix websocket handler bug on Python3.5 with no uvloop
2017-05-17 12:12:25 +08:00
messense
7cc02e84ed
Fix json loads bug on Python 3.5
2017-05-17 12:12:25 +08:00
messense
05d0ddc281
Gunicorn worker should not require uvloop
2017-05-15 00:01:51 +08:00
Johnny Rocketfingers
b1890f50b6
Conform to pep8
2017-05-14 10:15:11 +02:00
Johnny Rocketfingers
b44c707e94
Prevent incorrect tuple size on get_extra_info errors
...
According to https://docs.python.org/3/library/asyncio-protocol.html#asyncio.BaseTransport.get_extra_info ,
get_extra_info fails by returning None. This is an attempt in
normalization of the response in cases of AF_INET, AF_INET6 and
erroneous return values.
2017-05-14 09:56:56 +02:00
Johnny
4c7675939a
Fix "TypeError: not all arguments converted during string formatting"
...
socket.getpeername() returns AF_INET6 address family four-tuple, with
flowid and scopeid.
In server's write_response, an exception is raised when an IPv6 client
connects due to four-tuple elements having two unused elements (flowid
and scopeid).
This makes sure that only the first two (host and port) are used in log
string formatting.
2017-05-13 17:35:04 +02:00
Eli Uriegas
fa1b7de52a
Merge pull request #706 from messense/feature/remove-log-file
...
Remove timedRotatingFile log config
2017-05-12 10:56:19 -07:00
Jeremy Zimmerman
f39512aa63
double if statement ( #707 )
...
* Migrated `%` string formating
* double if statement
combined double 'if' to a single 'if' with 'and'
* Revert "Fix "Prefer `format()` over string interpolation operator" issue"
2017-05-11 11:49:32 -07:00
messense
c3683662c2
Remove timedRotatingFile log config
2017-05-11 11:18:59 +08:00
38elements
6a14e49479
Replace stream decorator to stream parameter
2017-05-09 22:31:15 +09:00
Eli Uriegas
ac5e1a6ebd
Fix import
2017-05-08 20:47:20 -07:00
Eli Uriegas
bfcd499cc2
Remove default_filter module, put into logging
2017-05-08 20:41:34 -07:00
Eli Uriegas
3e88ec18e2
Actually add file >.>
2017-05-08 20:37:44 -07:00
Eli Uriegas
1fb640c313
Fix camel case module
2017-05-08 20:36:57 -07:00
Eli Uriegas
307d866bb6
Increment to 0.5.4
2017-05-08 17:44:23 -07:00
Eli Uriegas
768be433d6
Increment to 0.5.3
2017-05-08 17:42:26 -07:00
38elements
4d4f38fb35
is_request_stream for CompositionView and HTTPMethodView
2017-05-09 01:04:03 +09:00
38elements
0b53c413a7
Add stream decorator for HTTPMethodView
2017-05-07 21:33:15 +09:00
38elements
931397c7e1
Add stream for CompositionView
2017-05-07 18:38:48 +09:00
38elements
ef2cc7ebf5
Add Request.stream
2017-05-07 18:38:48 +09:00
38elements
25037006bf
Remove utils.py
2017-05-04 15:52:18 +09:00
38elements
e12c10b087
Remove loop argument in run() and create_server()
2017-05-03 17:52:19 +09:00
38elements
0a2c95cc10
Remove before_start, before_stop, after_start and after_stop
2017-05-02 23:07:09 +09:00
Eli Uriegas
c35721abbd
Merge pull request #670 from ticosax/set-exit-code-on-error
...
In case of error when starting sanic
2017-05-01 15:16:02 -07:00
Alec Buckenheimer
69511c2783
added exception chain rendering in debug #675
2017-05-01 12:56:33 -04:00
banteg
7754bb995b
expose matched request uri template
2017-04-29 02:39:56 +07:00
Nicolas Delaby
d1fefce61c
fixup! In case of error when starting sanic
2017-04-28 20:06:44 +02:00
Nicolas Delaby
c3abdab9c4
The main process that spawn sub processes doesn't run any loop.
...
let's not try to stop one
2017-04-28 19:57:49 +02:00
Nicolas Delaby
8b13e103fd
In case of error when starting sanic
...
Don't exit with code 0
2017-04-28 19:08:51 +02:00
Eli Uriegas
436d37c079
Add the killing of children
...
Kills children processes when parent process receives a signal to
shutdown.
Solves for #594
2017-04-27 17:47:08 -07:00
Eli Uriegas
ed0081fcf7
Merge pull request #625 from zenixls2/master
...
based on issue #608 , create access log
2017-04-27 14:31:53 -07:00
Eli Uriegas
140062f8a3
Merge pull request #662 from rsrdesarrollo/master
...
invariant: body after request is processed must be binary
2017-04-27 14:31:28 -07:00
Philip Xu
9152a1a266
Improved on wording
2017-04-27 03:16:38 -04:00
Philip Xu
ade89ab795
Fix #665 - ImportError not preserved in __main__.py
2017-04-26 22:57:19 -04:00
Raúl Sampedro
85acddddba
invariant: body after request is processed must be binary
2017-04-25 12:00:27 +02:00
zenix
c9d747d97f
fix merge error
2017-04-25 11:46:13 +09:00
zenix
0bba267808
Merge branch 'master' of https://github.com/channelcat/sanic
2017-04-25 11:07:40 +09:00
Eli Uriegas
5fd62098bd
Increment to 0.5.2
2017-04-24 11:37:04 -07:00
Raphael Deem
74cc7be922
Merge branch 'master' into master
2017-04-24 00:47:01 -07:00
Raphael Deem
b3814ca89a
Merge pull request #646 from r0fls/637
...
allow disabling keep alive
2017-04-24 00:43:16 -07:00
Raphael Deem
9caa4fec4a
Merge pull request #656 from r0fls/token-rework
...
update token attribute
2017-04-21 22:44:42 -07:00
Raphael Deem
a0cba1aee1
accept token directly in auth header
2017-04-21 22:36:45 -07:00
Eli Uriegas
a7d17fae44
Fix duplicate signal settings for gunicorn worker
2017-04-21 17:06:52 -05:00
38elements
bc035fca78
Remove unnecessary variables
2017-04-20 18:27:28 +09:00
38elements
df914a92e4
Fix this.signal.stopped
is True
#639
2017-04-19 11:19:01 +09:00
Raphael Deem
81b6d988ec
NO_KEEP_ALIVE -> KEEP_ALIVE
2017-04-16 22:43:49 -07:00
Raphael Deem
5ddb0488f2
allow disabling keep alive
2017-04-16 22:03:20 -07:00
Raphael Deem
3e87314adf
use absolute path in static root
2017-04-16 21:58:10 -07:00
Raphael Deem
f6d4a06661
Merge pull request #643 from aryeh/allow_unknown_status_codes
...
Allow unknown status codes
2017-04-16 18:42:59 -07:00
Raphael Deem
ff17fc95e6
Merge pull request #632 from messense/feature/path-route
...
Add path type for router
2017-04-16 18:39:10 -07:00
aryeh
ff0632001c
prevent crash for unknown response codes
...
set text for unknown status code, otherwise when None is used exception occurs.
2017-04-16 10:07:29 -04: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
zenix
0bbf826b21
fix typo
2017-04-13 16:52:40 +09:00
zenix
02d1900e2f
try to fix container error
2017-04-13 16:49:36 +09:00
zenix
73da11b04c
switch to use streaming for access log and error log
2017-04-13 16:26:13 +09:00
zenix
4af07e3731
change naming of default log config
2017-04-13 13:49:45 +09:00
zenix
7f60f85cd4
Merge branch 'master' of https://github.com/channelcat/sanic
2017-04-13 13:35:37 +09:00
messense
4c66cb1854
Fix static files router
2017-04-13 12:11:38 +08:00
messense
35b92e1511
Add path type for router
2017-04-13 11:34:35 +08:00
Raphael Deem
e5d3fe52c5
Merge pull request #630 from 38elements/keep_alive
...
Refactor keep_alive
2017-04-12 19:46:33 -07:00
zenix
c5f137c715
fix original code logic
2017-04-12 18:52:01 +09:00
zenix
66923bc0e3
remove unused param
2017-04-12 18:48:16 +09:00
zenix
36d4d85849
change to use default python config code
2017-04-12 18:44:47 +09:00
zenix
5f0e05f3bf
fix flake8
2017-04-12 18:08:06 +09:00
adam.serafini
235e5511eb
Bump version
2017-04-12 11:02:13 +02:00
zenix
6fb60ae0b1
Merge branch 'master' of https://github.com/channelcat/sanic
2017-04-12 18:01:12 +09:00
38elements
7fe418d1b7
Refactor keep_alive
2017-04-12 17:55:22 +09:00
zenix
f872ceb0d9
fix bug in access logging when error happens
2017-04-12 17:39:17 +09:00
Eli Uriegas
015c87b5e1
Add traceback for better debugging
2017-04-11 16:02:57 -05:00