Commit Graph

282 Commits

Author SHA1 Message Date
Roman 4dcf92a7ec fix typo (#219) 2018-11-16 17:56:15 +00:00
Tom Christie 8d973c25bd Version 0.8.5 2018-11-16 14:04:08 +00:00
Tom Christie 98fa5598de Tweak test case 2018-11-16 13:52:05 +00:00
Tom Christie de71b85948 Merge branch 'master' of https://github.com/encode/starlette 2018-11-16 13:51:22 +00:00
supriyo-biswas 1e4ce58ec7 Fix incorrect decoding of application/x-www-form-urlencoded request body (#217)
* Fix incorrect decoding of application/x-www-form-urlencoded request body.

* Add test for URLencoded forms.
2018-11-16 13:51:14 +00:00
Tom Christie 14650bfd22
URL convertors (#221)
* Version 0.8.4

* Add support for path convertors

* Add to_string on convertors
2018-11-16 13:50:55 +00:00
赖信涛 a0bb1f5f23 Suooprt HTTP 304 for static files. (#212)
* feat: support HTTP 304

* test for staticfiles 304

* fix email.utils functions

* fix mypy test, just ignore parsedate result type

* not reparsing the FileResponse

* fix black check

* delete unused import and print

* fix type annotation
2018-11-14 11:38:01 +00:00
David Larlet 9a51a63d35 Documentation typo (#218) 2018-11-14 10:58:05 +00:00
Tom Christie 5845f71374 Merge branch 'master' of https://github.com/encode/starlette 2018-11-12 10:58:18 +00:00
Jesse Braham 5fc8b394e2 Include Jinja2 in the [full] optional package (#213) 2018-11-11 01:54:21 +00:00
Jordan Eremieff d0b342981e Move arg (#210) 2018-11-10 08:02:51 +00:00
Tom Christie cb025432a3 Version 0.8.4 2018-11-09 18:03:35 +00:00
Tom Christie c504323eaf
Default to empty body on responses (#208) 2018-11-09 17:59:58 +00:00
Tom Christie 3a16d66049 Version 0.8.3 2018-11-09 13:41:49 +00:00
Tom Christie b0b67d26c8 Merge branch 'master' of https://github.com/encode/starlette 2018-11-09 13:40:24 +00:00
Tom Christie 7455fd1f47
URL reconstruction fix (#204)
* Version 0.8.2

* Fix URL reconstruction
2018-11-09 13:39:51 +00:00
Tom Christie ce62bdfa51
Add name to app routes (#205)
* Version 0.8.2

* Add name argument to app.route(...)
2018-11-09 13:38:29 +00:00
Tom Christie 7b91341d6f Version 0.8.2 2018-11-08 17:00:24 +00:00
赖信涛 8e30f073f0 Do not read file for HEAD method on StaticFiles (#176)
* Do not read file for HEAD method on StaticFiles

* bugfix left in FileResponse

* add test for StaticFiles HEAD method

* restore aiofiles'open after testcase

* format code using black

* Send "http.response.body" instead of disconnect.

body default to b"";
more_body default to False;

fix testcase.

* rebase master, revert background task back

* update param name, send_header_only -> method

* No need to instantiate a new Request, just use scope

* style code using black
2018-11-08 16:59:00 +00:00
Tom Christie c96eb9a4f7 Add Jinja2 link 2018-11-08 16:36:39 +00:00
Tom Christie 2ef21f49c9
Jinja2 (#198)
* Use jinja2 for a default template configuration

* Add release notes
2018-11-08 16:14:14 +00:00
Tom Christie 291255b24c Merge branch 'master' of https://github.com/encode/starlette 2018-11-08 13:12:46 +00:00
Tom Christie c2d5813076 Link to example repo 2018-11-08 13:12:37 +00:00
Tom Christie 3faded4f26
Remove redundant test cases 2018-11-08 12:33:58 +00:00
Tom Christie bf51fc2d22 Version 0.8.0 2018-11-08 12:07:17 +00:00
Tom Christie 8f736f20ac Add SessionMiddleware's max_age to docs 2018-11-08 12:00:51 +00:00
Jesse Braham a7e0af0a98 Implement session expiry with configurable maximum age (#186)
* Set a maximum age for sessions

* Test session expiry for full coverage

* Fix mypy error

* Handle old-style sessions (ie. no timestamp)
2018-11-08 11:59:27 +00:00
Tom Christie 9f3dcb7d2b
Rejig ExceptionMiddleware and ServerErrorMiddleware (#193)
* Rejig ExceptionMiddleware and ServerErrorMiddleware

* Tweak DebugMiddleware implementation

* Support custom 500 handlers

* Exception handling updates
2018-11-08 11:59:15 +00:00
Witekkq 0c3453815c fixed issue 188,trailing spaces not allowed in header (#194) 2018-11-08 09:34:06 +00:00
Alexander Botello 150c7092e5 StaticFiles will check if directory exists upon instantiation (#195)
* Add check_dir parameter

* Add test coverage for check_dir

* Update documentation

* linting

* Remove extra space
2018-11-08 09:33:20 +00:00
Tom Christie 58888bb53f Version 0.7.4 2018-11-07 13:42:26 +00:00
Tom Christie b686174d0e
Add `async run_in_threadpool(func, *args, **kwargs)` (#192)
* Add run_in_threadpool

* Fix contextvars support with threadpools
2018-11-07 13:38:29 +00:00
Tom Christie 380351027b Add template snippet 2018-11-06 17:03:34 +00:00
Tom Christie 02678b3b0e Version 0.7.3 2018-11-06 16:59:54 +00:00
Tom Christie efecf56735
Add support for name to mount points. (#184)
* Support name on app.mount(...)

* Add templating docs

* Remove erronous commit

* Linting
2018-11-06 16:57:57 +00:00
Tom Christie d48bf30b75 Add docs for third party middleware classes 2018-11-06 14:06:25 +00:00
Tom Christie 385ec33700 Version 0.7.2 2018-11-06 12:21:54 +00:00
Tom Christie 3e2e3430d1
Add `@app.middleware(...)` decorator (#183)
* Add @app.middleware() decorator

* Linting

* Drop erronous check-in

* Type hinting for BaseHTTPMiddleware
2018-11-06 12:19:52 +00:00
Tom Christie 34d0097feb Add 'endpoint' info to scope when routing 2018-11-05 16:58:38 +00:00
Tom Christie 026b904656 Mutate scope, rather than copying it. 2018-11-05 15:21:24 +00:00
Tom Christie 90f21fbc95 Drop redundant 'router' in scope 2018-11-05 15:21:06 +00:00
Tom Christie 83ab71dad0 Version 0.7.1 2018-11-05 12:08:34 +00:00
Urchin 5ded82ff0e Update README.md (#174) 2018-11-05 11:49:00 +00:00
Marcos Schroh 537947d814 feat(DebugMiddleware): Output improved. (#179) 2018-11-05 11:46:56 +00:00
Tom Christie 3c7573715d
Add www_redirect behavior to TrustedHostsMiddleware (#181) 2018-11-05 11:38:20 +00:00
zya-performance 552e0f6f2d adds background task param to StreamingResponse and FileResponse (#167)
*  adds background task param to StreamingResponse

* allows FileResponse to run a background task after last bye is sent

* test StreamingResponse and FileResponse with background task

* linted

* added a blank line to match CI expectations
2018-11-05 11:38:05 +00:00
Tom Christie 23c009ca53
Finesse mount routing (#173)
* Finesse mount routing

* Add redirect_slashes behavior

* Add redirect_slashes behavior

* Support url_path_for, with mounted apps.
2018-11-05 11:11:35 +00:00
Tom Christie ed970c86be Update 'Performance' section 2018-11-01 14:41:55 +00:00
Tom Christie d86b0aa8a9 Version 0.7.0 2018-11-01 12:56:21 +00:00
Tom Christie 5584568f8a
Drop add_graphql_route, in favor of more consistent API style (#170) 2018-11-01 12:52:16 +00:00