~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/dispatch/__init__.py

  • Committer: wagrant
  • Date: 2008-09-20 07:56:43 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1055
www.dispatch: Don't sent incomplete XHTML for either type of error.

Show diffs side-by-side

added added

removed removed

Lines of Context:
274
274
            req.write("<p>Warning: Could not open Error Log: '%s'</p>\n"
275
275
                %cgi.escape(logfile))
276
276
        req.write('</div>\n')
 
277
        html.write_html_foot(req)
277
278
    else:
278
279
        # A "bad" error message. We shouldn't get here unless IVLE
279
280
        # misbehaves (which is currently very easy, if things aren't set up
310
311
        # Logging
311
312
        logging.error('%s\n%s'%(str(msg), tb))
312
313
 
313
 
        req.write("""<html>
 
314
        req.write("""<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"                 
 
315
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">                                      
 
316
<html xmlns="http://www.w3.org/1999/xhtml">
314
317
<head><title>IVLE Internal Server Error</title></head>
315
318
<body>
316
319
<h1>IVLE Internal Server Error""")
334
337
        if logfail:
335
338
            req.write("<p>Warning: Could not open Error Log: '%s'</p>\n"
336
339
                %cgi.escape(logfile))
337
 
        req.write("</body>")
 
340
        req.write("</body></html>")