16 def simpleerror(env, startreq, code, title, msg):
17 buf = """<?xml version="1.0" encoding="US-ASCII"?>
18 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
19 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
27 </html>""" % (title, title, htmlquote(msg))
28 buf = buf.encode("ascii")
29 startreq("%i %s" % (code, title), [("Content-Type", "text/html"), ("Content-Length", str(len(buf)))])