chiark
/
gitweb
/
~mdw
/
chopwood
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cgi.py: Emit the error about `POST' content-type correctly.
[chopwood]
/
cmd-cgi.py
diff --git
a/cmd-cgi.py
b/cmd-cgi.py
index 6dc59ee44666363fe5a63c15f3897fd5b126c004..63253b74a068924a0f1ae99f545ce3bc16b623ef 100644
(file)
--- a/
cmd-cgi.py
+++ b/
cmd-cgi.py
@@
-85,6
+85,13
@@
def cmd_reset_cgi(services = []):
def cmd_clear_cgi(services = []):
operate('clear passwords', 'clear', services)
def cmd_clear_cgi(services = []):
operate('clear passwords', 'clear', services)
+@CGI.subcommand(
+ 'logout', ['cgi'],
+ 'Log out of the web interface.')
+def cmd_logout_cgi():
+ CGI.redirect(CGI.action('login', why = 'LOGOUT'),
+ set_cookie = HA.bake_cookie('logged-out'))
+
@CGI.subcommand(
'fail', ['cgi-noauth'],
'Raise an exception, to test the error reporting machinery.',
@CGI.subcommand(
'fail', ['cgi-noauth'],
'Raise an exception, to test the error reporting machinery.',