400 - Bad Request
{}
Your request can't be understood. Check the parameters.
#!/usr/bin/python3 # -*- coding: utf-8 -*- root = '/var/www' owner = 'Oskar Skog' my_url = '/read/' canonical_url = 'https://__HOST__/read/' html403file = '/var/www/oops/403.html' html404file = '/var/www/oops/404.html' html503file = '/var/www/oops/cgi503.html' import sys sys.path.append(root) import cgi import os import errno import compressout import base64 import re import time import htmlescape import string import spammy import sitemap as mod_sitemap # Name conflict with already existing function. import cgitb cgitb.enable() rootlen = len(root) #html_mime = 'text/html' # Set to XHTML later. html_page = 'Content-Type: text/html; charset=UTF-8\n' # Set to XHTML later. conf = eval(open('read.cfg').read()) def redirect_spam(destination): '''`destination` is the URL to which assholes should be redirected.''' compressout.write_h('Status: 303\n') compressout.write_h('Location: {}\n'.format(destination)) compressout.write_h('\n') def status400(message): '''HTTP 400; `message` goes UNESCAPED inside a
element.''' compressout.write_h('Status: 400\n') compressout.write_h(html_page) compressout.write_h('\n') compressout.write_b('''__HTML5__400 - Bad Request __NAVIGATION__'''.format(message)) compressout.write_b(''' __FOOTER__ 400 - Bad Request
{}Your request can't be understood. Check the parameters.