aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/util/wsgi.py
Commit message (Collapse)AuthorAgeFilesLines
* util:wsgi: Don't clobber `handler` when clearing StreamHandlersW. Trevor King2013-01-311-2/+2
| | | | | | | | | | | | | This bug was introduced in: commit 400c9251eedbd1caa3b28135b4bc5d2bf2124ac5 Author: W. Trevor King <wking@tremily.us> Date: Thu Jan 24 02:43:53 2013 -0500 util:wsgi: If we're logging to a file, shift libbe.LOG too where the removed handlers clobbered our initial TimedRotatingFileHandler.
* util:wsgi: If we're logging to a file, shift libbe.LOG tooW. Trevor King2013-01-241-0/+5
| | | | This avoids attempts to log to stderr if we're daemonizing the server.
* util:wsgi: handle all dispatch() exceptions in BEExceptionAppW. Trevor King2012-10-281-9/+15
| | | | | | This brings BEExceptionApp into closer agreement with libbe.ui.command_line.dispatch(), and avoids having the server go down when a user submits a silly command.
* Use libbe.util.http.HTTP_USER_ERROR everywhere instead of hardcoding 418W. Trevor King2012-10-281-3/+3
|
* util:wsgi: catch NoIDMatches in BEExceptionAppW. Trevor King2012-10-281-0/+4
|
* util:wsgi: add --daemon, --pidfile, and --logfileW. Trevor King2012-10-281-25/+151
| | | | | | | | | | | | | | | | | | | | This allows you to manage BE servers from inetd scripts, etc. Shortcomings of the current implementation: * ServerCommand._daemonize() currently only sets a SIGTERM handler and double forks. If you want to do this right, see PEP 3143. Unfortunately, the PEP seems to have stalled, python-daemon appears unmaintained, and I don't care enough at the moment to do this right. * ServerCommand._get_pidfile() races between checking for an existing PID file and claiming the file itself. It is possible that two processes would check around the same time, and both see no existing file. Then they would both open the PID file and write their pid, without noticing that the other process was contending for the file. Solving this requires file locking, which is difficult to do portably. This shouldn't be an issue in normal operation, where each server will be using its own PID file path.
* util:wsgi: fix From -> from typo in pyOpenSSL commentW. Trevor King2012-10-271-1/+1
|
* util:wsgi: fix get_cert_filenames -> _get_cert_filenames typoW. Trevor King2012-10-271-1/+1
| | | | | | | | | | | This was broken in the creation of libbe.util.wsgi from libbe.command.serve: commit 0fa17f6bf6a809df14ae1930542059a9e62066b0 Author: W. Trevor King <wking@tremily.us> Date: Mon Aug 27 13:37:58 2012 -0400 libbe:util:wsgi: extract WSGI utilities into a separate module.
* util:wsgi: import os.path for _get_cert_filenames()W. Trevor King2012-10-271-0/+1
| | | | | | | | | | | This was lost in the creation of libbe.util.wsgi from libbe.command.serve: commit 0fa17f6bf6a809df14ae1930542059a9e62066b0 Author: W. Trevor King <wking@tremily.us> Date: Mon Aug 27 13:37:58 2012 -0400 libbe:util:wsgi: extract WSGI utilities into a separate module.
* util:wsgi: fix Clossing -> Closing typo.W. Trevor King2012-10-271-1/+1
|
* util:wsgi: remove %default from option help stringsW. Trevor King2012-10-271-2/+2
|
* Ran update-copyright.py.W. Trevor King2012-10-161-1/+17
|
* util:wsgi: WSGITestCase should not subclass WSGICaller.W. Trevor King2012-09-031-10/+18
| | | | | | | | The old implementation caused a number of unittest errors. This commit adds a WSGICaller instance as WSGITestCase.caller, and provides a wrapper .getURL method which copies the status/headers/etc. from the caller back into the WSGITestCase.
* util:wsgi: Pull WSGICaller out of WSGITestCase.W. Trevor King2012-09-031-49/+56
|
* util:wsgi: add HandlerErrorApp to return HTTP errors.W. Trevor King2012-09-031-0/+13
|
* util:wsgi: fix WSGI_AppObject.default_callback -> .default_handler typo.W. Trevor King2012-09-031-1/+1
|
* command:serve-storage: rename `be serve` -> `be serve-storage`.W. Trevor King2012-08-291-1/+2
| | | | | | | | | | This will help avoid confusion between be serve-storage and be serve-commands
* util:wsgi: add BEExceptionApp for translating storage exceptions.W. Trevor King2012-08-291-0/+22
| | | | | | This fixes .test_get_initial_value for the HTTP backend, because the tests use TestingHTTP.getURL, which only catch HandlerError, not the more specific storage exceptions.
* libbe:util:wsgi: extract WSGI utilities into a separate module.W. Trevor King2012-08-271-0/+962