summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix #1350: Serve compresed files as is in static_file()defnull-1350Marcel Hellkamp2021-10-142-16/+17
| | | | Do not instruct browsers to transparently uncompress gzipped files.
* Fix title caseEmil Sadek2021-07-071-2/+2
| | | Change capitalization to title case for consistency.
* Fix: Multipart file uploads with empty filename not detected as binary.Marcel Hellkamp2021-07-071-3/+3
|
* RefactoringMarcel Hellkamp2021-03-271-16/+16
|
* fix #1226: Reloading fails for packages started with `python -m`Marcel Hellkamp2021-03-271-0/+4
|
* refactor.WSGIFileWrapper.__iter__()SergBobrovsky2021-01-011-3/+3
| | | a little clearer
* Deprecated diesel server adapterMarcel Hellkamp2021-01-012-1/+2
|
* Remove cherrypy from tests.Marcel Hellkamp2021-01-011-1/+2
| | | | | The adapter is deprecated, only cherrypy <9 is supported, and that breaks tests for Python 3.9.
* #fix 1244 Attribute Error if sys.stdout/sys.stderr is NoneMarcel Hellkamp2021-01-011-17/+14
|
* Changed __repr__ of RouteMarcel Hellkamp2020-12-311-1/+1
| | | | from <module:name GET /route> to <GET /route -> module:name>
* Fix Docs Import to include routeStephen Daves2020-12-311-1/+1
|
* Fix more typos.Karthikeyan Singaravelan2020-12-311-3/+3
|
* Fix typos in documentation.Karthikeyan Singaravelan2020-12-313-3/+3
|
* Improve __repr__ of RouteOz N Tiram2020-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current improvement really helps when using multiple apps. When I start such an application I like logging which routes are available, for example one can do: ``` for r in main_app.routes: print(r) ``` Which previously gave this: ``` <GET '<:re:(de|us)?\\/?>' <function index at 0x7f750fda9670>> <GET '/<:re:(de/|us/)?>hello/<name:path>/<_id:int>/' <function _index_with_param at 0x7f750fda9700>> <GET '/<:re:(de/|us/)?><:re:foo>/' <function _index at 0x7f750fda9820>> <GET '/<:re:(de/|us/)?><url:path>/' <function main at 0x7f750fda9940>> <GET '<:re:(de|us)?\\/?>' <function main at 0x7f750fda9940>> <GET '/admin/login/' <function Auth.get_login_template at 0x7f751061e670>> <POST '/admin/login/' <function Auth.post_login_template at 0x7f751061e700>> <GET '/admin/' <function index at 0x7f750fd21940>> <GET '/editor/' <function editor at 0x7f750f930ca0>> <POST '/editor/template/' <function template_ at 0x7f750f930dc0>> <GET '/editor/preview/<name:path>' <function load_tmp_template at 0x7f750f930ee0>> <POST '/editor/validate-jinja/' <function convert at 0x7f750f937040>> <GET '/static/front/<filepath:path>' <function app_factory.<locals>.server_static at 0x7f750f937af0>> <GET '/static/admin/<filepath:path>' <function app_factory.<locals>.server_static at 0x7f750f937c10>> <GET '/static/editor/<filepath:path>' <function app_factory.<locals>.server_static at 0x7f750f937d30>> ``` Memory addresses are of very little use (I can only tell which route is which because I mount them to different prefixes (e.g. editor, admin, etc.). This also mathes the directory structure on the file system. However, this is not always the case, some times I mount applications without prefix. With the current patch I can immidietly tell where a route is coming from: ``` apps.front.views:index GET <:re:(de|us)?\/?> apps.front.views:_index_with_param GET /<:re:(de/|us/)?>hello/<name:path>/<_id:int>/ apps.front.views:_index GET /<:re:(de/|us/)?><:re:foo>/ apps.front.views:main GET /<:re:(de/|us/)?><url:path>/ apps.front.views:main GET <:re:(de|us)?\/?> tiny.auth:get_login_template GET /admin/login/ tiny.auth:post_login_template POST /admin/login/ apps.admin.views:index GET /admin/ apps.editor.views:editor GET /editor/ apps.editor.views:template_ POST /editor/template/ apps.editor.views:load_tmp_template GET /editor/preview/<name:path> apps.editor.views:convert POST /editor/validate-jinja/ __main__:server_static GET /static/front/<filepath:path> __main__:server_static GET /static/admin/<filepath:path> __main__:server_static GET /static/editor/<filepath:path> ``` I think this little patch might be usefull for others too.
* Fix unicode error in tests for python 2.7Marcel Hellkamp2020-12-311-0/+1
|
* Transifex push/pull and updated makefileMarcel Hellkamp2020-12-31115-4327/+22764
|
* Drop fapws3 and Python 3.5 support.Marcel Hellkamp2020-12-3110-49/+30
| | | | | fapws3 is unmaintained for 3 years and breaks tests. Python 3.5 is end-of-life.
* Don't re-raise critical errors that occur while handling an errorBraedon Vickers2020-12-311-3/+0
| | | | | | | | | | | | | | | | | | This logic was added to satisfy pep-3333, where the error handling section says application authors should "never trap errors raised by start_response when exc_info is being provided". However, this appears to be intended to prevent applications from catching exc_info being re-raised by start_response(), which happens when an application tries to send an error response (includes exc_info), but can't as output has already been written to the client. These exceptions should be thrown up to the server so it can abort the connection, not caught by the application. In this case, the start_response() call in question may be an error response, but it's always the first call to start_response(), so should never re-raise exc_info in this way. As such, the special handling is unnecessary.
* Tests added to pass CIBubaVV2020-12-311-0/+30
| | | | Hope it's enough. Exception raising in wsgi() is covered
* Provide exc_info to start_response() when handling exceptionsBraedon Vickers2020-12-311-1/+8
| | | | | | | | | | | Recommended by pep-3333 to enable middleware to provide exception handling services, e.g. custom exception logging. See https://www.python.org/dev/peps/pep-3333/#error-handling Note that the exc_info is temporarily stored in the environ to pass it up from _handler() to wsgi(), where start_response() is called. There may be a better way to do this, e.g. storing it in the response object.
* Add bottle tools to plugins pageArjoonn Sharma2020-12-311-0/+3
|
* Fix syntax warning over comparison of literals using is.Karthikeyan Singaravelan2020-12-311-2/+2
|
* Adding new pluginalfonsocv122020-12-311-2/+4
|
* fix a broken link to beaker documentation.tatsuya45592020-12-311-1/+1
|
* Add Python3.8 and Python3.9 classifieresOz N Tiram2020-12-311-0/+2
| | | | | This are tested and should work for all users running Python3.8 and Python3.9.
* Drop Python version 3.5Oz N Tiram2020-12-312-3/+2
| | | | This version is EOL since 2020-09-05.
* Drop Python3.4Oz N Tiram2020-12-312-3/+2
| | | | This Python version is EOL since 2019-03-18.
* Don't mutate headers dict passed into static_file()Braedon Vickers2020-12-312-1/+11
| | | | | Mutating the passed in dict can produce unexpected results if the caller re-uses the dict, e.g. uses the same set of headers for multiple files.
* Add tests for #602 bugMantas2020-12-311-2/+7
| | | | | | | | | | | | | | | | | | | | It looks that #602 is gone, but I'm not sure when exactly it was fixed. I see that there is a suspicious change [here](https://github.com/bottlepy/bottle/commit/d85a6983ceedacd9ab9afbcd027139d8773b67ac): environ['PATH_INFO'] = path.encode('latin1').decode('utf8', 'ignore') Where original cause of the error was removed and replaced by `'ignore'`. Also fixed deprecation warnings, where: @self.subapp.route('') Does exactly same thing as this: @self.subapp.route('/test/<test>') Where `''` is passed to `route()`, then `makelist()` utility assumes that nothing is passed and falls back to path autogeneration from callbackf unction. Not sure if this is expected behaviour?
* change list to tupleSergBobrovsky2020-12-311-1/+1
|
* remove redundant round bracketsSergBobrovsky2020-12-311-1/+1
|
* redundant bracketsSergBobrovsky2020-12-311-2/+2
|
* remove useless assignmentSergBobrovsky2020-12-311-1/+1
| | | look 13 lines down
* some shorteningsSergBobrovsky2020-12-311-4/+1
|
* fix erroneous expressionSergBobrovsky2020-12-311-1/+1
| | | | | | | | from standart module "operator" ``` def is_not(a, b): "Same as a is not b." return a is not b ```
* Do not split query strings on `;` anymore.Marcel Hellkamp2020-11-111-1/+1
| | | | | | | | | | | Using `;` as a separator instead of `&` was allowed a long time ago, but is now obsolete and actually invalid according to the 2014 W3C recommendations. Even if this change is technically backwards-incompatible, no real-world application should depend on broken behavior. If you REALLY need this functionality, monkey-patch the _parse_qsl() function. # Conflicts: # bottle.py
* Correct a typo in bottle.pyFelix Yan2020-10-301-1/+1
|
* Fixed some typos in the release notes for 0.13Felix Breidenstein2020-06-021-1/+1
|
* reuse port in Bjoern adapterRui Carmo2020-06-021-1/+1
|
* Fix broken link to WSGI specification (#1210)Wouter Wijsman2020-04-111-2/+2
| | | * Fixed link to WSGI Specification
* fix #1155: Catastrophic backtracking issue in template parser.Marcel Hellkamp2020-01-031-1/+1
| | | | Related to #1194
* fix #1194: Regular expression catastrophic backtracking in ↵Marcel Hellkamp2020-01-031-1/+1
| | | | bottle.Router.rule_syntax
* Fix catastrophic backtracking issue in header parsing regular expression.Marcel Hellkamp2020-01-031-1/+1
| | | | | | The affected pattern is only used from a single non-public function, which in turn is not actually used anywhere. It's in dead code. No security issue.
* Revert "fix #1186: Bottle fails to find templates on windows"Marcel Hellkamp2019-12-201-2/+3
| | | | This reverts commit 085f18615fe8ab63588eebfd25bb90337aac2ba0.
* gunicorn: switch to use BaseApplicationRobert Coup2019-12-191-4/+5
| | | | This means configuration is only pulled from what is supplied through Bottle, not (for example) re-parsed from the commandline. Follows documented approach at http://docs.gunicorn.org/en/stable/custom.html
* fix test case张酉夫2019-12-191-1/+1
| | | | setting expires with naive datetime is treated as UTC time
* refine parse_date张酉夫2019-12-191-1/+1
|
* fix date formatting for non-English locales张酉夫2019-12-192-19/+27
|
* fix typo in the Route class docstringvascop2019-12-181-1/+1
|
* Removed circle-ci and travis-ci in favor of GitHub actions.Marcel Hellkamp2019-12-185-109/+4
|