@@ -2,9 +2,9 @@ | |||||
<ul> | <ul> | ||||
% for key, value in environ.items(): | % for key, value in environ.items(): | ||||
% if key not in ["wsgi.input", "wsgi.errors", "PATH"]: | % if key not in ["wsgi.input", "wsgi.errors", "PATH"]: | ||||
<li><b>${key}</b>: ${value}</li> | |||||
<li><b>${key}</b>: ${value | h}</li> | |||||
% elif key == "wsgi.input": | % elif key == "wsgi.input": | ||||
<li><b>${key}</b>: ${value.read(environ.get("CONTENT_LENGTH", 0))}</li> | |||||
<li><b>${key}</b>: ${value.read(environ.get("CONTENT_LENGTH", 0)) | h}</li> | |||||
% endif | % endif | ||||
% endfor | % endfor | ||||
</ul> | </ul> | ||||
@@ -45,23 +45,30 @@ | |||||
</form> | </form> | ||||
<h2>Cookies</h2> | <h2>Cookies</h2> | ||||
% if cookies: | % if cookies: | ||||
<ul> | |||||
<table> | |||||
% for cookie in cookies.itervalues(): | % for cookie in cookies.itervalues(): | ||||
<li> | |||||
<tt>${cookie.key | h}</tt>: <tt>${cookie.value | h}</tt> | |||||
<form action="${environ['PATH_INFO']}" method="post"> | |||||
<input type="hidden" name="action" value="delete"> | |||||
<input type="hidden" name="cookie" value="${cookie.key | h}"> | |||||
<button type="submit">Delete</button> | |||||
</form> | |||||
</li> | |||||
<tr> | |||||
<td><b><tt>${cookie.key | h}</tt></b></td> | |||||
<td><tt>${cookie.value | h}</tt></td> | |||||
<td> | |||||
<form action="${environ['PATH_INFO']}" method="post"> | |||||
<input type="hidden" name="action" value="delete"> | |||||
<input type="hidden" name="cookie" value="${cookie.key | h}"> | |||||
<button type="submit">Delete</button> | |||||
</form> | |||||
</td> | |||||
</tr> | |||||
% endfor | % endfor | ||||
</ul> | |||||
<form action="${environ['PATH_INFO']}" method="post"> | |||||
<input type="hidden" name="action" value="delete"> | |||||
<input type="hidden" name="all" value="1"> | |||||
<button type="submit">Delete all</button> | |||||
</form> | |||||
<tr> | |||||
<td> | |||||
<form action="${environ['PATH_INFO']}" method="post"> | |||||
<input type="hidden" name="action" value="delete"> | |||||
<input type="hidden" name="all" value="1"> | |||||
<button type="submit">Delete all</button> | |||||
</form> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
% else: | % else: | ||||
<p>No cookies!</p> | <p>No cookies!</p> | ||||
% endif | % endif | ||||
@@ -28,7 +28,7 @@ div#container { | |||||
div#footer { | div#footer { | ||||
position: fixed; | position: fixed; | ||||
width: 100%; | width: 100%; | ||||
height: 70px; | |||||
height: 50px; | |||||
bottom: 0; | bottom: 0; | ||||
font-size: 12px; | font-size: 12px; | ||||
text-align: center; | text-align: center; | ||||
@@ -21,7 +21,7 @@ def main(context, environ, headers): | |||||
if query.cookie in cookies: | if query.cookie in cookies: | ||||
delete_cookie(headers, cookies, query.cookie) | delete_cookie(headers, cookies, query.cookie) | ||||
elif query.all: | elif query.all: | ||||
for cookie in cookies.values: | |||||
for cookie in cookies.values(): | |||||
if cookie.path.startswith(cookies.path): | if cookie.path.startswith(cookies.path): | ||||
delete_cookie(headers, cookies, cookie.key) | delete_cookie(headers, cookies, cookie.key) | ||||