bottle
bottle copied to clipboard
bottle.py is a fast and simple micro-framework for python web-applications.
Hi, I'm running latest bottle version from github (today) with default engine and python 3.4.1. Sometime, I got this weird message (memory leak?) on console output : ``` .../dev/lib/python3.4/site-packages/bottle.py:1661: ResourceWarning:...
```python import bottle app = bottle.Bottle() @app.hook('after_request') def fn(): print(dict(bottle.response.headers)) bottle.response.headers['abc'] = 'yes' print(dict(bottle.response.headers)) @app.get('/') def asdf(): return '' app.run() ``` This code runs properly. I'm able to get the...
Hello all, I'm currently working on a Pysa contribution to annotate potential places where user-controlled data may be received from web servers. Bottle is one of the frameworks that caught...
The argument sets an optional `Cache-Control` header for redirects. Allows for more fined-grained control over client and browser caching for known short- and long-lived redirects. The argument accepts an integer...
This fixes #580 It seems the current release and the dev versions are different. This dev version adds a headers kwarg, which is not how the rest of bottle works,...
Trying to figure out why this toy code wasn't working: ``` @app.route('/') def get_basic_file(): response.set_cookie('basic_cookie', 1) return static_file('index.html', 'path') ``` It seems the static_file() method never looks at the original...
This is an issue in preparation for a patch I will be trying to make. I want to update Bottle to accept `pathlib.Path` paths across the board. My plan is...
This is a proposal inspired by a requirement I had myself and by the following comment on [Stack Overflow](https://stackoverflow.com/questions/22839474/python-bottle-how-to-upload-media-files-without-dosing-the-server#22847275): “Bottle stores file uploads in request.files as FileUpload instances, along with...
Right now, Bottle directly calls cgi.FieldStorage to parse incoming data. cgi.FieldStorage has a 'make_file' method defined with the following comment: ``` def make_file(self, binary=None): """Overridable: return a readable & writable...