tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

slow-executor.py (397B)


      1 import os.path
      2 import time
      3 
      4 from wptserve.pipes import template
      5 
      6 def main(request, response):
      7    time.sleep(float(request.GET.first(b"delay")))
      8    response.headers.set(b"Content-Type", b"text/html")
      9    response.headers.set(b"Cache-Control", b"no-store")
     10    response.content = template(
     11        request,
     12        open(os.path.join(os.path.dirname(__file__), "executor.sub.html"), "rb").read())