Commit Graph

2676 Commits

Author SHA1 Message Date
Sean Parsons
a03f216f42 Added additional docstrings to blueprints.py 2016-12-25 00:47:51 -05:00
Raphael Deem
7d7cbaacf1 header format function 2016-12-24 20:56:13 -08:00
Raphael Deem
00b5a496dd type -> isinstance 2016-12-24 20:56:13 -08:00
Raphael Deem
7e6c92dc52 convert header values to strings 2016-12-24 20:56:13 -08:00
Eli Uriegas
6cf3754051 Merge pull request #226 from seemethere/increment_019
Increment version to 0.1.9
2016-12-24 18:54:07 -08:00
Eli Uriegas
cf7616ebe5 Increment version to 0.1.9 2016-12-24 18:51:16 -08:00
Eli Uriegas
5b7964f8b6 Merge pull request #225 from seemethere/add_response_body_not_a_string_test
Add test for PR: #215
2016-12-24 18:50:11 -08:00
Eli Uriegas
f1f38c24da Add test for PR: #215 2016-12-24 18:47:15 -08:00
Eli Uriegas
67a50becb0 Merge pull request #215 from cr0hn/patch-1
Improvement: avoid to encoding in each HTTP Response
2016-12-24 18:41:01 -08:00
Eli Uriegas
d7e94473f3 Use a try/except, it's a bit faster
Also reorder some imports and add some comments
2016-12-24 18:37:55 -08:00
Eli Uriegas
184c896f41 Merge pull request #224 from seemethere/rewrite_static_files_tests
Rewrite static files tests
2016-12-24 18:23:06 -08:00
Eli Uriegas
8be849cc40 Rewrite static files tests
Relates to PR #188

Changes include:
- Rewriting to work with pytest fixtures and an actual static directory
- Addition of a test that covers file paths that must be
  unquoted as a uri
2016-12-24 18:18:56 -08:00
Eli Uriegas
275851a755 Merge pull request #188 from webtic/master
Find URL encoded filenames on the fs by decoding them first
2016-12-24 18:14:45 -08:00
Eli Uriegas
16182472fa Remove trailing whitespace 2016-12-24 18:11:46 -08:00
Eli Uriegas
29f3c22fed Rework conditionals to not be inline 2016-12-24 18:11:12 -08:00
Eli Uriegas
a116666d55 Merge pull request #223 from r0fls/115
Raise error if response is malformed.
2016-12-24 17:12:17 -08:00
Raphael Deem
c2622511ce Raise error if response is malformed. Issue #115 2016-12-24 17:09:41 -08:00
Eli Uriegas
50243037eb Merge pull request #222 from seemethere/add_py36_testing
Adds python36 to tox.ini and .travis.yml
2016-12-24 14:11:55 -08:00
Eli Uriegas
74f305cfb7 Adds python36 to tox.ini and .travis.yml 2016-12-24 14:06:53 -08:00
Eli Uriegas
75990fbaf4 Merge pull request #220 from kgantsov/master
Make golang performance test return JSON instead of string
2016-12-24 13:40:24 -08:00
cr0hn
cc982c5a61 Update response.py
Type check by isinstance
2016-12-24 15:24:25 +01:00
38elements
2d05243c4a Refactor arguments of run function 2016-12-24 22:49:48 +09:00
Konstantin Hantsov
2f0a582aa7 Make golang performance test return JSON instead of string 2016-12-24 10:28:34 +01:00
Eli Uriegas
665881471d Merge pull request #217 from cr0hn/patch-3
Upgraded Middlewares doc: Explain how to chain two (or more) middlewares
2016-12-23 22:31:03 -08:00
38elements
39211f8fbd Refactor arguments of serve function 2016-12-24 11:40:07 +09:00
Raphael Deem
32ea45d403 allow overriding logging.basicConfig 2016-12-23 16:17:34 -08:00
Eli Uriegas
cd17a42234 Fix some verbage 2016-12-23 09:59:28 -08:00
Eli Uriegas
8e19b5938c Merge pull request #216 from cr0hn/patch-2
Apply response Middleware always
2016-12-23 09:57:38 -08:00
Eli Uriegas
9e208ab744 Merge pull request #210 from kdelwat/testing-documentation
Create documentation for testing server endpoints.
2016-12-23 09:57:22 -08:00
Eli Uriegas
94bd9702e5 Merge pull request #211 from rmno/master
Fixed import error in docs
2016-12-23 09:57:08 -08:00
cr0hn
3add40625d Explain how to chain two (or more) middlewares
A funny and useful examples about how to chain middlewares.
2016-12-23 16:07:59 +01:00
cr0hn
5afae986a0 Apply response Middleware always
Response middleware are useful to apply some post-process information, just before send to the user. For example: Add some HTTP headers (security headers, for example), remove "Server" banner (for security reasons) or cookie management. 

The change is very very simple: although an "request" middleware has produced any response, we'll even apply the response middlewares.
2016-12-23 15:59:04 +01:00
cr0hn
f091d82bad Improvement
improvement: support fo binary data as a input. This do that the response process has more performance because not encoding needed.
2016-12-23 13:12:59 +01:00
Stefano Palazzo
a73a7d1e7b Make it possible to disable the logo by subclassing Config 2016-12-23 11:42:00 +01:00
Romano Bodha
5c1ef2c1cf Fixed import error 2016-12-23 01:42:05 +01:00
Cadel Watson
8411255700 Create documentation for testing server endpoints.
Currently the sanic.utils functionality is undocumented. This provides
information on the interface as well as a complete example of testing
a server endpoint.
2016-12-23 11:08:04 +11:00
38elements
c657c531b4 Customizable protocol 2016-12-23 00:13:38 +09:00
Eli Uriegas
ef9d8710f5 Merge pull request #200 from 38elements/invalid-usage
Change HttpParserError process
2016-12-17 22:50:00 -06:00
38elements
75fc9f91b9 Change HttpParserError process 2016-12-18 09:25:39 +09:00
Tim Mundt
ef9edfd160 added documentation for configuration 2016-12-17 20:20:07 +01:00
Tim Mundt
234a7925c6 restored accidentally degraded doc string 2016-12-17 19:24:41 +01:00
Tim Mundt
a550b5c112 added tests and small fixes for config 2016-12-16 18:46:07 +01:00
Tim Mundt
04798cbf5b added methods to load config from a file 2016-12-16 17:05:09 +01:00
Eli Uriegas
545d9eb59b Merge pull request #198 from sagnew/patch-2
Fix quotes in sample code for consistency
2016-12-14 11:39:22 -06:00
Sam Agnew
a9b67c3028 Fix quotes in sample code for consistency 2016-12-14 12:36:33 -05:00
Eli Uriegas
35e79f3985 Merge pull request #171 from jpiasetz/convert_dict_to_set
Convert connections dict to set
2016-12-14 11:30:45 -06:00
Eli Uriegas
435d5585e9 Fix leftover blank line
flake8 build failed here: https://travis-ci.org/channelcat/sanic/builds/183991976
2016-12-14 11:29:09 -06:00
Eli Uriegas
ddfb7f2861 Merge branch 'master' into convert_dict_to_set 2016-12-14 11:26:31 -06:00
Eli Uriegas
6c806549ae Merge pull request #194 from sagnew/patch-1
Fix PEP8 in Hello World example
2016-12-13 11:44:53 -06:00
Sam Agnew
8957e4ec25 Fix PEP8 in Hello World example 2016-12-13 12:35:46 -05:00