Commit Graph

762 Commits

Author SHA1 Message Date
Raphael Deem
f16ea20de5 provide default app name 2016-11-18 17:16:48 -08:00
Eli Uriegas
edb12da154 Fix the flake8 error caused by new flake8 version 2016-11-16 12:55:13 -06:00
Eli Uriegas
b51af7f4bf Merge pull request #147 from webtic/master
Add the client address to the request header
2016-11-10 15:30:04 -06:00
Eli Uriegas
28ce2447ef Update variable name
Give `ra` a more explicit name
2016-11-10 15:28:16 -06:00
Paul Jongsma
8ebc92c236 pass flake8 tests 2016-11-10 13:09:37 +01:00
Paul Jongsma
b92e46df40 fix whitespace 2016-11-10 13:06:27 +01:00
Paul Jongsma
be5588d5d8 Add the client address to the request header 2016-11-10 12:53:00 +01:00
Pahaz Blinov
0d9fb2f927 docs(request): return value docstring 2016-11-09 18:04:15 +05:00
Pahaz Blinov
0e9819fba1 fix(request): parse_multipart_form should return RequestParameters
I have this code:

```
form = FileForm(request.files)
```

and it raise error because the `request.files` is `dict` but `RequestParameters` is expected =/
2016-11-09 00:36:37 +05:00
Pahaz Blinov
5efe51b661 fix(request.py): problem in case of request without content-type header (#142)
* fix(request.py): exception if access request.form on GET request

* fix(request): just make a unification (parsed_form and parsed_files) + RFC fixes

parsed_form and parsed_files must be a RequestParameters type in all cases!
2016-11-07 15:27:50 -06:00
Pahaz Blinov
1b65b2e0c6 fix(blueprints): @middleware IndexError (#139) 2016-11-06 10:08:55 -06:00
Eli Uriegas
1271c7d958 Merge pull request #128 from channelcat/keep-alive-timeout-fix
Keep alive timeout fix
2016-11-05 12:11:41 -06:00
Eli Uriegas
3a1ef6bef2 Merge pull request #125 from clenimar/fix-comments
Fix comments over-indentation
2016-11-03 08:27:39 -06:00
imbolc
3cd3b2d9b7 Fix upload without content-type 2016-11-03 12:34:55 +07:00
Marcin Baran
80fcacaf8b Add loop kwargs to sanic_endpoint_test 2016-11-02 12:27:58 +01:00
Channel Cat
707c55fbe7 Fix flake8 2016-10-28 03:35:30 -07:00
Channel Cat
c44b5551bc time.time faster than loop.time? 2016-10-28 03:13:03 -07:00
Channel Cat
bd28da0abc Keep-alive requests stay open if communicating 2016-10-28 02:56:32 -07:00
Clenimar Filemon
f3fc958a0c Fix comments over-indentation 2016-10-27 11:09:36 -03:00
Channel Cat
65950250d9 Merge pull request #111 from channelcat/reverse-static
Reverse static arguments
2016-10-25 02:52:21 -07:00
Channel Cat
74ae0007d3 Reverse static arguments 2016-10-25 02:45:28 -07:00
Channel Cat
977081f4af Merge pull request #110 from channelcat/cookies-lazy-creation
Lazy cookie creation
2016-10-25 01:50:33 -07:00
Channel Cat
ee70f1e55e Upped to version 0.1.6 2016-10-25 01:49:43 -07:00
Channel Cat
9c16f6dbea Fix flake8 issues 2016-10-25 01:36:12 -07:00
Channel Cat
c50aa34dd9 Lazy cookie creation 2016-10-25 01:27:54 -07:00
Channel Cat
0e479d53da Merge pull request #104 from channelcat/pr/101
Static file support
2016-10-24 22:42:01 -07:00
Channel Cat
53e00b2b4c Added blueprint order test and used deques to add blueprints 2016-10-24 02:09:07 -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
pcdinh
5361c6f243 e is an unused variable. Safe to remove 2016-10-23 19:38:28 +07:00
pcdinh
963aef19e0 w is unused variable to it is safe to suppress Pylint warning using _
(underscore)
2016-10-23 19:36:08 +07:00
Channel Cat
47ec026536 Fix incomplete request body being read 2016-10-23 03:30:13 -07:00
Channel Cat
e70263d012 Merge pull request #87 from channelcat/blueprint-extras
Blueprint start/stop listeners + ordering
2016-10-23 02:04:55 -07:00
Channel Cat
41ea40fc35 increased server event handler type flexibility 2016-10-23 01:51:46 -07:00
Channel Cat
3802141007 Adding cookie capabilities for issue #74 2016-10-23 01:32:16 -07:00
Channel Cat
a5614f6880 Added server start/stop listeners and reverse ordering on response middleware to blueprints 2016-10-21 04:11:18 -07:00
Hyungtae Kim
c256825de6 Content Type of JSON response should not have a charset 2016-10-20 13:38:03 -07:00
Channel Cat
d4e2d94816 Added support for routes with / in custom regexes and updated lru to use url and method 2016-10-20 11:33:28 +00:00
John Piasetzki
f510550888 Fix flake8 2016-10-20 01:37:12 -04:00
John Piasetzki
fc4c192237 Add simple uri hash to lookup 2016-10-20 01:29:22 -04:00
John Piasetzki
f4b45deb7f Convert dict to set 2016-10-20 00:28:05 -04:00
John Piasetzki
d1beabfc8f Add lru_cache to get 2016-10-20 00:28:05 -04:00
John Piasetzki
baf1ce95b1 Refactor get 2016-10-20 00:28:05 -04:00
John Piasetzki
e25e1c0e4b Convert string formats 2016-10-20 00:28:05 -04:00
John Piasetzki
04a6cc9416 Refactor add parameter 2016-10-20 00:28:05 -04:00
John Piasetzki
50e4dd167e Extract constant 2016-10-19 23:43:31 -04:00
John Piasetzki
f2cc404d7f Remove simple router 2016-10-19 23:41:22 -04:00
Ludovic Gasc (GMLudo)
7dcdc6208d Enable after_start and before_stop callbacks for multiprocess 2016-10-20 01:01:51 +02:00
Ubuntu
3d00ca09b9 Added fast lookup dict for common response codes 2016-10-19 08:37:35 +00:00
Ubuntu
69345272cd Merge branch 'feature/statuscode' of https://github.com/mikoim/sanic into mikoim-feature/statuscode 2016-10-19 08:26:11 +00:00
Channel Cat
2903e7ee7c Merge pull request #65 from blakev/feature/expose-loop
Exposes `loop`in sanic `serve` and `run` functions (#64)
2016-10-19 01:21:15 -07:00
Channel Cat
71a783e7e1 Merge pull request #59 from yishibashi/comment-fix
comment fixed
2016-10-18 21:14:10 -07:00
Channel Cat
c58741fe7a Changed start failure to print exception 2016-10-18 16:50:14 -07:00
Eshin Kunishima
7b0f524fb3 Added HTTP status codes
Based on http.HTTPStatus
2016-10-19 01:53:11 +09:00
Blake VandeMerwe
5e459cb69d Exposes loopin sanic serve and run functions (#64) 2016-10-18 10:05:29 -06:00
yishibashi
7c3faea0dd comment fixed 2016-10-18 19:32:47 +09:00
Channel Cat
4ecb4d2cce Added newline to fix flake8 error 2016-10-18 01:38:50 -07:00
Channel Cat
c539933e38 Fixed unused import, added change log 2016-10-18 01:31:09 -07:00
Channel Cat
6f105a647e Added multiprocessing 2016-10-18 01:22:49 -07:00
Channel Cat
18aa937f29 Fix slowdown 2016-10-17 23:34:07 -07:00
Channel Cat
73ef816d89 Merge pull request #45 from mindflayer/master
Fix for string tokens
2016-10-16 14:23:29 -07:00
Channel Cat
031a95e4d9 Merge pull request #39 from seemethere/fix_flake8_errors
Fix flake8 errors
2016-10-16 13:54:36 -07:00
Giorgio Salluzzo
2ee4c0fc6a Merge branch 'master' of github.com:mindflayer/sanic 2016-10-16 22:42:06 +02:00
Giorgio Salluzzo
3e8b8fb46f Fix for issue #44. 2016-10-16 22:41:56 +02:00
abhishek7
3c7a8a5f45 Added some documentation to request.py, removed extra line in blueprints.py, and minor grammar enhancements to blueprints.md and middleware.md 2016-10-16 11:35:45 -04:00
Eli Uriegas
ea0a037248 Fix flake8 errors 2016-10-16 08:01:59 -05:00
Channel Cat
9d388e9933 Fixed flake8 errors 2016-10-16 02:21:24 -07:00
Channel Cat
d195db0fd3 merged 2016-10-16 09:01:39 +00:00
Channel Cat
40b1ec91f0 Added blueprint exception and middleware support, and tests 2016-10-16 01:48:51 -07:00
Channel Cat
9b716e97ee Merge branch 'feature_blueprints' of https://github.com/narzeja/sanic into narzeja-feature_blueprints 2016-10-16 08:21:35 +00:00
Channel Cat
8e07edb211 Merge pull request #33 from channelcat/middleware-unreachable
Middleware unreachable
2016-10-16 01:14:50 -07:00
Channel Cat
41a1a72a95 Merge pull request #26 from radarhere/master
Fixed typos
2016-10-16 00:53:59 -07:00
Channel Cat
516f661a38 Removed unreachable code and old middleware class 2016-10-16 00:52:39 -07:00
narzeja
b19452a1a7 assert warning clarification and adding blueprint containers to app object 2016-10-16 06:48:49 +02:00
narzeja
d761c34e8b basic blueprint functionality 2016-10-16 06:43:22 +02:00
narzeja
aaf571fae4 Blueprint support, with docs, example, and tests 2016-10-16 06:43:22 +02:00
Ubuntu
13ba8d7325 merged changes 2016-10-16 04:20:12 +00:00
Andrew Murray
e3a6262012 Fixed typos 2016-10-16 12:28:24 +11:00
b.khasanov
a464d1e0b2 fix double router initializing 2016-10-16 01:14:47 +03:00
Michael Lavers
9f824b048e Introduce end-of-line normalization 2016-10-15 12:59:00 -07:00
John Piasetzki
dd249ca665 Use printf-style String Formatting for output 2016-10-15 14:58:31 -04:00
John Piasetzki
6a1f706387 Remove unused imports 2016-10-15 14:58:22 -04:00
Channel Cat
254861bc37 Reformatted code to use spaces instead of tabs 2016-10-14 19:53:49 -07:00
channelcat
67db0bcbf3 Merge pull request #4 from n1ywb/master
add http:// to server info message so it's clickable
2016-10-14 19:40:40 -07:00
Jeff Laughlin
ba5363ef43 add http:// to server info message so it's clickable 2016-10-14 18:50:41 -04:00
Eli Uriegas
4684083f2f Move helpers from tests to sanic proper 2016-10-14 17:36:32 -05:00
Channel Cat
818826b4b0 Removed unnecessary log 2016-10-14 05:09:14 -07:00
Channel Cat
dbd11bf387 Reverting 2016-10-14 03:59:41 -07:00
Channel Cat
ec10d24ac6 Minor speed improvements 2016-10-14 03:57:48 -07:00
Channel Cat
62c1235f58 speed improvements 2016-10-14 03:52:21 -07:00
Channel Cat
33f712ef9b Proper errors when server cannot bind 2016-10-14 03:42:20 -07:00
Channel Cat
a74ab9bd18 Added tests and middleware, and improved documentation 2016-10-14 03:23:48 -07:00
Channel Cat
49c499f44d Added examples and form processing 2016-10-09 15:28:31 -07:00
Channel Cat
8fbc6c2c4e Moved request handling into sanic 2016-10-08 19:45:11 -07:00
Channel Cat
b0d38f8a04 Performance degraded - added in request too large and keep-alive timeout 2016-10-08 17:27:10 -07:00
Channel Cat
fa980b1445 Performance improvements to url parsing 2016-10-08 16:04:18 -07:00
Channel Cat
6041e7cfa6 Performance improvements to response and moved tests around 2016-10-08 15:21:40 -07:00
Channel Cat
e8287df3e5 Fixed POST request getting JSON 2016-10-06 01:23:52 -07:00
Channel Cat
d40e750ce6 added on_start on_stop 2016-10-05 05:30:36 +00:00
Channel Cat
4489f536da . 2016-10-03 00:45:59 -07:00
Channel Cat
fed5c01efb fix 4watt 2016-10-03 00:38:53 -07:00
Channel Cat
ffd521b67b derp 2016-10-03 00:35:20 -07:00
Channel Cat
ee98c8b42f . 2016-10-03 07:27:54 +00:00
Channel Cat
7cdeff63f6 Decode data by default 2016-10-02 23:55:46 -07:00
Channel Cat
2ad7014666 Args should be an empty dict if none exist 2016-10-02 22:31:31 -07:00
Channel Cat
7ec5432f64 Fixed coroutine checking 2016-10-02 22:03:14 -07:00
Channel Cat
af2cf771d4 Added better debug info 2016-10-02 21:11:38 -07:00
Channel Cat
b59dc2729f Added better error handling and coroutine checking 2016-10-02 20:47:15 -07:00
Channel Cat
e0b9260644 Sanic can now parse args and json 2016-10-02 18:45:44 -07:00
Channel Cat
0489526ac9 Fix crash 2016-10-02 17:32:27 -07:00
Channel Cat
8cc028764d Fixed keep-alive header and broken connection handling 2016-10-02 02:18:41 +00:00
Channel Cat
a75986e357 Initial Commit 2016-05-25 21:52:42 -07:00