Raphael Deem
0189e4ed59
Merge pull request #962 from ProstoMaxim/fix_logs
...
Fix logs
2017-10-08 20:16:11 -07:00
Max Murashov
4b3920daba
Fix logs
2017-10-06 16:53:30 +03:00
Raphael Deem
d876e3ed5c
fix false cookie encoding and output
2017-10-05 22:20:50 -07:00
Piotr Buliński
4b877e3f6b
Update server.py
2017-10-05 09:28:13 +02:00
Piotr Buliński
8ce749e339
Update server.py
2017-10-05 09:27:18 +02:00
Piotr Buliński
752ddfa7fc
Merge branch 'master' into refactor_server_access_log
2017-10-05 09:26:19 +02:00
Piotr Bulinski
e3852ceeca
Refactor access log for server
2017-10-04 12:50:57 +02:00
Yun Xu
225ea49b6f
resolve conflicts again
2017-10-01 01:22:27 -07:00
Raphael Deem
15fd49037f
Merge pull request #939 from ashleysommer/keepalive_timeout
...
Split RequestTimeout, ResponseTimeout, and KeepAliveTimeout into different timeouts
2017-09-30 22:15:50 -07:00
Raphael Deem
9aec5febb8
support vhosts in static routes
2017-09-27 01:24:49 -07:00
lixxu
f96ab02767
set scheme to http if not provided
2017-09-27 09:59:49 +08:00
Raphael Deem
4ce699e57f
Merge pull request #944 from blazehu/master
...
add __repr__ for sanic request
2017-09-25 13:58:09 -07:00
Raphael Deem
4ee042c330
Merge pull request #948 from chiuczek/json-dependency-injection
...
Use dependency injection to allow alternative json parser or encoder
2017-09-24 21:05:39 -07:00
Yun Xu
0b23f4ff81
resolve conflicts
2017-09-23 06:19:09 -07:00
Hugh McNamara
5cef1634ed
use json_loads function in json property of request
2017-09-22 10:19:15 +01:00
Hugh McNamara
a8f764c161
make method instead of property for alternative json decoding of request
2017-09-19 18:12:53 +01:00
Hugh McNamara
1d719252cb
use dependency injection to allow alternative json parser or encoder
2017-09-19 14:58:49 +01:00
lanf0n
d8cebe1188
to fix if platform is windows.
2017-09-19 18:14:25 +08:00
huyuhan
074d36eeba
add __repr__ for sanic request
2017-09-15 21:15:05 +08:00
huyuhan
f6eb35f67d
add __repr__ for sanic request
2017-09-15 21:05:25 +08:00
huyuhan
77f70a0792
add __repr__ for sanic request
2017-09-15 20:56:44 +08:00
huyuhan
12dafd07b8
add __repr__ for sanic request
2017-09-15 18:34:56 +08:00
Wèi Cōngruì
eb1146c6b6
fix #763 , sanic can't decode latin1 encoded header value
2017-09-14 19:23:02 +08:00
Yun Xu
5ee7b6caeb
fixing small issue
2017-09-13 10:35:34 -07:00
Yun Xu
9c4b0f7b15
fix flake8
2017-09-13 07:40:42 -07:00
aiosin
2e5d1ddff9
add status codes and teapot example
2017-09-13 14:08:29 +02:00
Yun Xu
24bdb1ce98
add unit tests/refactoring
2017-09-12 23:42:42 -07:00
Ashley Sommer
8eb59ad4dc
Fixed error where the RequestTimeout test wasn't actually testing the correct behaviour
...
Fixed error where KeepAliveTimeout wasn't being triggered in the test suite, when using uvloop
Fixed test cases when using other asyncio loops such as uvloop
Fixed Flake8 linting errors
2017-09-13 10:18:36 +10:00
Raphael Deem
d8c8ccd180
Merge pull request #932 from lixxu/master
...
static files url building using url_for
2017-09-12 12:59:04 -07:00
Yun Xu
a46e004f07
apply new loggers
2017-09-11 22:12:49 -07:00
Ashley Sommer
2979e03148
WIP - Split RequestTimeout, ResponseTimout, and KeepAliveTimeout into different timeouts, with different callbacks.
2017-09-11 17:17:33 +10:00
Yun Xu
4bdb9a2c8e
prototype
2017-09-10 23:19:09 -07:00
Yun Xu
986135ff76
remove DefaultFilter
2017-09-10 18:39:42 -07:00
Yun Xu
c9cbc00e36
use access_log as param
2017-09-10 18:38:52 -07:00
Yun Xu
c9a40c180a
remove some logging stuff
2017-09-10 11:11:16 -07:00
Yun Xu
c4417b399b
fixing debug logging
2017-09-08 17:47:05 -07:00
lixxu
bc20dc5c62
use url_for for url building for static files
2017-09-06 19:17:52 +08:00
Tim Mundt
e2e25eb751
fixed flake convention
2017-09-05 11:05:31 +02:00
Tim Mundt
9572ecc5ea
test for env var prefix
2017-09-05 10:58:48 +02:00
Tim Mundt
97d8b9e908
documentation for env var prefix; allow passing in the prefix through the app constructor
2017-09-05 10:41:55 +02:00
Tim Mundt
c59a8a60eb
make the prefix for environment variables alterable
2017-09-05 09:53:33 +02:00
Raphael Deem
158da0927a
Merge pull request #901 from lixxu/master
...
add name option for route building
2017-08-31 15:29:03 -07:00
Darren
6038813d03
fix #914 , change arguments of Unauthorized.__init__
2017-08-24 22:59:25 +08:00
lixxu
762b2782ee
use name to define route name for different methods on same url
2017-08-22 14:02:38 +08:00
lixxu
eab809d410
add name option for route building
2017-08-21 18:05:34 +08:00
Yun Xu
63babae63d
add doc
2017-08-21 00:28:01 -07:00
Yun Xu
ef81a9f547
make strict_slashes default value configurable
2017-08-20 23:11:38 -07:00
Raphael Deem
df4a149cd0
Merge pull request #885 from yunstanford/master
...
add triggers events when async create_server
2017-08-09 15:59:44 -07:00
Yun Xu
80f27b1db9
add unit tests and make flake8 happy
2017-08-08 22:21:40 -07:00
Yun Xu
d5d1d3b45a
add trigger before_start events in create_server
2017-08-08 21:58:10 -07:00
Miguel Grinberg
375ed23216
Weboscket subprotocol negotiation
...
Fixes #874
2017-08-08 11:40:44 -07:00
MichaelYusko
7216bf7835
merge master into local branch
2017-08-03 12:11:47 +03:00
Eli Uriegas
f80a6ae228
Increment to 0.6.0
2017-08-02 19:11:53 -07:00
Eli Uriegas
2228104bff
Merge pull request #862 from zyguan/revert-599fbce
...
revert 599fbce
2017-07-31 13:51:04 -07:00
Raphael Deem
402c3752c4
Merge pull request #871 from Frzk/unauthorized-exception
...
Simplified the Unauthorized exception __init__ signature.
2017-07-31 12:23:12 -07:00
François KUBLER
69a8bb5e1f
Fixed a trailing white space in the docstring.
2017-07-28 22:29:45 +02:00
François KUBLER
b65eb69d9f
Simplified the Unauthorized exception __init__ signature.
...
(again).
Use of **kwargs makes it more straight forward and easier to use.
2017-07-27 23:00:27 +02:00
MichaelYusko
429f7377cb
Did the small changes for better readable
2017-07-26 19:32:23 +03:00
zyguan
918e2ba8d0
Revert "fix #752 "
...
This reverts commit 599fbcee6e
.
2017-07-24 11:53:11 +08:00
zyguan
f50dc83829
handle keep-alive timeout gracefully
2017-07-24 01:37:36 +08:00
Raphael Deem
173c62acb6
Merge branch 'master' into unauthorized-exception
2017-07-21 01:54:45 -07:00
Mohamed Akram
32be1a6496
Fix FreeBSD syslog path
2017-07-20 03:02:40 +04:00
Yun Xu
198bf55b7b
flake8 fix
2017-07-14 17:23:18 -07:00
Yun Xu
75378d3567
add remote_addr property for proxy fix
2017-07-14 09:29:16 -07:00
zenix
426e00b6f4
dont let dictConfig influence already exists configs
2017-07-13 15:09:04 +09:00
Raphael Deem
4265ad5f23
add versioning
2017-07-12 22:19:42 -07:00
Raphael Deem
8aafd72ef0
Merge branch 'auto-doc' of https://github.com/yunstanford/sanic
2017-07-12 20:19:30 -07:00
Jeong YunWon
47abf83960
Protocol configurable gunicorn worker
2017-07-12 22:30:13 +09:00
Jeong YunWon
be0f3731b4
ensure loop.close() and sys.exit() in gunicorn worker
2017-07-12 22:26:58 +09:00
Yun Xu
235687d983
should call lower just once
2017-07-10 12:37:21 -07:00
Yun Xu
3d75e6ed95
case-insensitive check for header fields
2017-07-10 12:29:47 -07:00
Raphael Deem
f0a956467c
Merge pull request #815 from yunstanford/master
...
add graceful timeout when shutdown
2017-07-08 11:31:37 -07:00
Yun Xu
e48bd08095
make flake8 happy
2017-07-02 10:05:33 -07:00
Yun Xu
5d00717f39
improve doc and remove warnings
2017-07-02 10:02:04 -07:00
Yun Xu
3fff685c44
add auto-doc support
2017-07-01 23:46:34 -07:00
Raphael Deem
1e75265eed
Merge pull request #756 from qwesda/master
...
fixes #755 fragmented headers
2017-06-30 18:24:51 -07:00
Raphael Deem
421f78f3e6
Merge pull request #814 from Frzk/forbidden-exception
...
Added a Forbidden exception
2017-06-30 18:11:23 -07:00
Raphael Deem
00d4533022
Merge pull request #821 from Frzk/bearer-support
...
Inverted the order of prefixes in Request.token property.
2017-06-29 09:43:34 -07:00
François KUBLER
e427e38da8
Simplified the Unauthorized.__init__
signature.
...
It doesn't really make sense to have a `realm` parameter in the method signature.
Instead, one can simply set the realm in the `challenge` dict if necessary.
Also fixed the tests accordingly (and added a new one for "Bearer" auth-scheme).
2017-06-29 12:34:52 +02:00
François KUBLER
1f24abc3d2
Fixed support for "Bearer" and "Token" auth-schemes.
...
Removed the test for "Authentication: Bearer Token <TOKEN>" which was not supposed to exist (see https://github.com/channelcat/sanic/pull/821 )
Also added a call to `split` when retrieving the token value to handle cases where there are leading or trailing spaces.
2017-06-29 10:23:49 +02:00
François
76e62779ba
Merge branch 'master' into forbidden-exception
2017-06-28 17:25:40 +02:00
Daniel Schwarz
b141fec573
Merge remote-tracking branch 'upstream/master'
...
# Conflicts:
# sanic/server.py
2017-06-27 13:32:49 +02:00
François KUBLER
d2e14abfd5
Inverted the order of prefixes in Request.token property.
...
As suggested by @allan-simon
See: https://github.com/channelcat/sanic/pull/811#pullrequestreview-46144327
2017-06-27 12:57:47 +02:00
Raphael Deem
d4abca0480
Merge pull request #818 from youknowone/debug
...
Introduce debug mode for HTTP protocol
2017-06-26 22:02:37 -07:00
Raphael Deem
395d85a12f
use try/except
2017-06-26 21:35:01 -07:00
Raphael Deem
4379a4b067
float logic
2017-06-26 20:59:59 -07:00
Raphael Deem
ad8e1cbf62
convert environment vars to int if digits
2017-06-26 20:49:41 -07:00
Jeong YunWon
dc5a70b0de
Introduce debug mode for HTTP protocol
2017-06-26 21:13:13 +09:00
Yun Xu
b5d1f52ea4
make flake8 happy
2017-06-25 10:22:40 -07:00
Yun Xu
d812affef0
add graceful_shutdown_timeout to gunicorn worker
2017-06-25 00:51:14 -07:00
Yun Xu
5c19eb34bf
add graceful_shutdown_timeout
2017-06-24 19:00:33 -07:00
Eli Uriegas
dbcbf12456
Merge pull request #811 from Frzk/bearer-support
...
Added support for 'Authorization: Bearer <TOKEN>' header...
2017-06-23 10:32:21 -07:00
Eli Uriegas
c04b44057c
Merge pull request #813 from Frzk/unauthorized-exception
...
Added an Unauthorized exception
2017-06-23 10:30:51 -07:00
François KUBLER
2848d7c80e
Added a Forbidden exception
...
Also added a small test.
2017-06-23 16:44:57 +02:00
François KUBLER
9fcdacb624
Modified the name of an argument.
2017-06-23 16:29:04 +02:00
François KUBLER
cf1713b085
Added a Unauthorized exception.
...
Also added a few tests related to this new exception.
2017-06-23 16:12:15 +02:00
7
f049a4ca67
Recycling gunicorn worker ( #800 )
...
* add recycling feature to gunicorn worker
* add unit tests
* add more unit tests, and remove redundant trigger_events call
* fixed up unit tests
* make flake8 happy
* address feedbacks
* make flake8 happy
* add doc
2017-06-22 13:26:50 -07:00
François KUBLER
55f860da2f
Added support for 'Authorization: Bearer <TOKEN>' header in Request.token
property.
...
Also added a test case for that kind of header.
2017-06-22 18:11:23 +02:00
Nikola Kolevski
d865c5e2b6
Conform to pep8
2017-06-20 13:22:28 +02:00
Nikola Kolevski
9fac37588c
Allow textual responses when using test_client and aiohttp 2
2017-06-20 13:15:30 +02:00